FileDocCategorySizeDatePackage
ConnectionRegistry.javaAPI DocphoneME MR2 API (J2ME)6110Wed May 02 18:00:00 BST 2007com.sun.midp.io.j2me.push

ConnectionRegistry

public final class ConnectionRegistry extends Object
JUMP Implementation of ConnectionRegistry.

Fields Summary
Constructors Summary
private ConnectionRegistry()
Hides constructor.

 
Methods Summary
static voidcheckRegistration(Connection connection, java.lang.String midlet, java.lang.String filter)
Check the registration arguments.

param
connection connection to check
param
midlet class name of the MIDlet to be launched, when new external data is available
param
filter a connection URL string indicating which senders are allowed to cause the MIDlet to be launched
throws
IllegalArgumentException if connection or filter string is not valid
throws
ConnectionNotFoundException if PushRegistry doesn't support this kind of connections

        // No implemented connections so far
        throw new ConnectionNotFoundException();
    
public static java.lang.StringgetFilter(java.lang.String connection)
Gets a filter of connection.

For details see javax.microedition.io.PushRegistry.getFilter

param
connection Connection to look a filter for
return
Filter

        // As we cannot register connections for now...
        return null;
    
public static java.lang.StringgetMIDlet(java.lang.String connection)
Gets a MIDlet class name of connection.

For details see javax.microedition.io.PushRegistry.getMIDlet

param
connection Connection to look MIDlet for
return
MIDlet name

        // As we cannot register connections for now...
        return null;
    
public static java.lang.String[]listConnections(com.sun.midp.midlet.MIDletSuite midletSuite, boolean available)
Lists all connections.

For details see javax.microedition.io.PushRegistry.listConnections

param
midletSuite MIDlet suite to list connections for
param
available if true, list connections with available data
return
connections

        // No connections so far
        return new String [0];
    
public static longregisterAlarm(com.sun.midp.midlet.MIDletSuite midletSuite, java.lang.String midlet, long time)
Registers time alaram.

For details see javax.microedition.io.PushRegistry.registerAlarm

param
midletSuite MIDlet suite to register alarm for
param
midlet Class to invoke
param
time Time to invoke
return
Previous time to invoke
throws
ClassNotFoundException If midlet references wrong class
throws
ConnectionNotFoundException If the system doesn't support alarms

        // As we cannot register connections for now...
        throw new ConnectionNotFoundException();
    
public static voidregisterConnection(com.sun.midp.midlet.MIDletSuite midletSuite, Connection connection, java.lang.String midlet, java.lang.String filter)
Registers a connection.

For details see javax.microedition.io.PushRegistry.registerConnection

param
midletSuite MIDlet suite to register connection for
param
connection Connection to register
param
midlet Class to invoke
param
filter Connection filter
throws
ClassNotFoundException If midlet references wrong class
throws
IOException If connection cannot be registered

        /*
         * Should never get here currently as <code>checkRegistration</code>
         * should abort registration earlier
         */
    
public static booleanunregisterConnection(com.sun.midp.midlet.MIDletSuite midletSuite, java.lang.String connection)
Unregisters a connection.

For details see javax.microedition.io.PushRegistry.unregisterConnection

param
midletSuite MIDlet suite to unregister connection for
param
connection Connection to unregister
return
was unregistration succesful or not

        // As we cannot register connections, we cannot unregister them as well
        return false;