Java Reference
In-Depth Information
return false;
}
}
public void addLine (String l) {
list.add(l);
}
public void actionPerformed (ActionEvent event) {
if (event.getSource() == configButton)
configure();
else {
transfer (text.getText());
text.setText ("");
}
}
public void startApp() {
frame.show();
if (timer == null) configure();
}
public void destroyApp (boolean unconditional) {
frame.setVisible (false);
disconnect();
}
public void pauseApp() {
}
}
MIDP 2.0 Additions to the javax.microedition.io Package
The Generic Connection Framework is extended by MIDP 2.0 with the following interfaces and classes:
• the HTTPSConnection interface supporting secure HTTP connections.
• the PushListener interface that needs to be used together with the new PushRegistry
class.
• the SecureConnection in order to establish SSL or TLS connections.
• the SecurityInfo interface.
• the ServerSocketConnection interface, which has already been described in this
chapter, is mandatory for MIDP 2.0.
• the UDPDatagramConnection interface that is derived from DatagramConnection .
The UDPDatagramConnection interface is derived from DatagramConnection and adds
two new methods to retrieve information about the local machine such as String
getLocalAddress() and int getLocalPort() .
Handling Inbound Connections
An application that needs to respond to inbound connections can be registered with the Application
Management Systems (AMS) in two ways. Although it is possible to call the
registerConnection() method of the PushRegistry dynamically, listeners for inbound
connections can also be statically registered using a new entry in the JAD file:
 
Search WWH ::




Custom Search