Java Reference
In-Depth Information
Please note, that not all generic connections will be appropriate for use as push application transport.
Even if a GCF protocol is supported on a particular device it is not required to be enabled as a valid
push mechanism.
The PushRegistry supports a listener model as well, which can be used by implementing the
PushListenerInterface in a subclass of MIDlet . In order to register a class implementing the
PushListener , the PushRegistry.setPushListener() method needs to be called, taking
the connection as first parameter, and the class implementing the PushListener interface as second
parameter. When the registered connection is established, the notifyConnection() method of the
PushListener interface is called. The parameter passed to notifyConnection() is a String
describing the incoming connection parameters.
Security
The new SecureConnection and HttpsConnection interfaces support the
getSecurityInfo() method returning a class implementing the SecurityInfo interface.
The SecurityInfo interface provides the following methods in order to get information about a
secure connection:
String getChipherSuite()
String getProtocolName()
String getProtocolVersion()
Certificate getServerCertificate()
Summary
In this chapter you have learned how to integrate network capabilities into your MIDlets. You
know the possible network protocols that might be supported in the CLDC profiles, especially the
HTTP protocol. You have also seen how to integrate these protocols using the generic connection
framework into applications such as the terminal and the chat client-server application.
 
Search WWH ::




Custom Search