I just posted the slides from Tuesday's class to the course syllabus page.
I also wanted to answer the question from lecture that I was unsure about for the MIDlet Push Registry. The final argument is the list of allowed senders that can activate the application. In my example it was "*" meaning that any host can send data to that port to wake up the application.
According to the article from Sun, this is the format of the push entry for the JAD file:
MIDlet-Push-<n>: <ConnectionURL>, <MIDletClassName>, <AllowedSender>
where:
* MIDlet-Push-<n> is the property name that identifies push registration, and where <n> is a number starting from 1; for example, MIDlet-Push-1. Note that multiple push entries are allowed.
* <ConnectionURL> is a URL connection string that identifies the inbound endpoint to register, in the same URL format used when invoking Connector.open(). For example, socket://:5000 reserves an inbound server socket connection on port 5000.
* <MIDletClassName> is the fully qualified class name of the MIDlet to be activated when network activity in <ConnectionURL> is detected; for example, j2medeveloper.basicpush.PushMIDlet.
* <Allowed-Sender> is a filter used to restrict the servers that can activate <MIDletClassName>. You can use wildcards; a * indicates one or more characters and a ? indicates one character. For example, 192.168.1.190, or 192.168.1.*, or 192.168.19?.1, or simply *.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment