| java.lang.Object com.sun.midp.jump.push.executive.ConnectionController
ConnectionController | final class ConnectionController (Code) | | Push connection controller.
|
Inner Class :final static class Reservations | |
Method Summary | |
public synchronized void | dispose() Disposes a connection controller. | public synchronized String | getFilter(int midletSuiteID, String connectionName) Fetches the filter by the connection. | public synchronized String | getMIDlet(int midletSuiteID, String connectionName) Fetches the MIDlet by the connection. | public synchronized String[] | listConnections(int midletSuiteID, boolean available) Returns a list of registered connections for MIDlet suite. | public synchronized void | registerConnection(int midletSuiteID, String midlet, ReservationDescriptor reservationDescriptor) Registers the connection. | public synchronized void | removeSuiteConnections(int midletSuiteID) Removes connections for the given suite.
NOTE: midletSuiteID must refer to valid installed
MIDlet suite. | public synchronized boolean | unregisterConnection(int midletSuiteID, String connectionName) Unregisters the connection. |
ConnectionController | public ConnectionController(Store store, ReservationDescriptorFactory reservationDescriptorFactory, LifecycleAdapter lifecycleAdapter)(Code) | | Creates an instance.
Parameters: store - persistent store to save connection info into(cannot be null ) Parameters: reservationDescriptorFactory - reservation descriptor factory(cannot be null Parameters: lifecycleAdapter - adapter to launch MIDlet (cannot be null ) |
dispose | public synchronized void dispose()(Code) | | Disposes a connection controller.
Cancels all the reservations and callbacks.
The only thing one MUST do with disposed
ConnectionController is to garbage-collect it.
|
getFilter | public synchronized String getFilter(int midletSuiteID, String connectionName)(Code) | | Fetches the filter by the connection.
Parameters: midletSuiteID - MIDlet suite ID to query for Parameters: connectionName - connectionName as passed intoConnectionController.registerConnection(cannot be null ) filter associated with connectionName ornull if there is no appropriate association |
getMIDlet | public synchronized String getMIDlet(int midletSuiteID, String connectionName)(Code) | | Fetches the MIDlet by the connection.
Parameters: midletSuiteID - MIDlet suite ID to query for Parameters: connectionName - connectionName as passed intoConnectionController.registerConnection(cannot be null ) MIDlet associated with connectionName or null if there is no appropriate association |
listConnections | public synchronized String[] listConnections(int midletSuiteID, boolean available)(Code) | | Returns a list of registered connections for MIDlet suite.
Parameters: midletSuiteID - MIDlet suite ID Parameters: available - if true , only returnthe list of connections with input available, otherwisereturn the complete list of registered connections forMIDlet suite array of registered connection strings, where each connectionis represented by the generic connection protocol,host and port number identification |
registerConnection | public synchronized void registerConnection(int midletSuiteID, String midlet, ReservationDescriptor reservationDescriptor) throws IOException(Code) | | Registers the connection.
Saves the connection into persistent store and reserves it
for MIDlet .
The connection should be already preverified (see
reservationDescriptor parameter) and all the security
checks should be performed.
Parameters: midletSuiteID - MIDlet suite ID Parameters: midlet - MIDlet class name(cannot be null ) Parameters: reservationDescriptor - reservation descriptor(cannot be null ) throws: IOException - if the connection is already registered orif there are insufficient resources to handle the registration request |
removeSuiteConnections | public synchronized void removeSuiteConnections(int midletSuiteID)(Code) | | Removes connections for the given suite.
NOTE: midletSuiteID must refer to valid installed
MIDlet suite. However, it might refer to the
suite without connections.
Parameters: midletSuiteID - ID of the suite to remove connections for |
unregisterConnection | public synchronized boolean unregisterConnection(int midletSuiteID, String connectionName) throws SecurityException(Code) | | Unregisters the connection.
Removes the connection from persistent store and cancels connection
reservation.
Parameters: midletSuiteID - MIDlet suite ID Parameters: connectionName - connection to unregister(cannot be null ) true if the unregistration was successful,false if the connection was not registered throws: SecurityException - if the connection was registered byanother MIDlet suite |
|
|