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

PushRegistryInternal

public final class PushRegistryInternal extends Object
Internal push functionality for JUMP stack. NOTE: some (if not all) methods might go away as a result of sources refactoring

Fields Summary
public static final int
PUSH_OPT_WHEN_ONLY_APP
Push option to only launch this suite when not other applications are running.
Constructors Summary
private PushRegistryInternal()
Hides the default constructor.


             
       
Methods Summary
public static voidenablePushLaunch(boolean enable)
Sets the flag which enables push launches to take place.

param
enable set to true to enable launching of MIDlets based on alarms and connection notification events, otherwise set to false to disable launches

 
public static voidinitSecurityToken(com.sun.midp.security.SecurityToken token)
Initializes the security token for this class, so it can perform actions that a normal MIDlet Suite cannot.

param
token security token for this class.

 
public static java.lang.StringlistConnections(int id, boolean available)
Return a list of registered connections for given MIDlet suite.

param
id identifies the specific MIDlet suite to be launched
param
available if true, only return the list of connections with input available
return
array of connection strings, where each connection is represented by the generic connection protocol, host and port number identification

        return null;
    
public static voidregisterConnectionInternal(com.sun.midp.midlet.MIDletSuite midletSuite, java.lang.String connection, java.lang.String midlet, java.lang.String filter, boolean bypassChecks)
Register a dynamic connection with the application management software. Once registered, the dynamic connection acts just like a connection preallocated from the descriptor file. The internal implementation includes the storage name that uniquely identifies the MIDlet. This method bypasses the class loader specific checks needed by the Installer.

param
midletSuite MIDlet suite for the suite registering, the suite only has to implement isRegistered, checkForPermission, and getID.
param
connection generic connection protocol, host and port number (optional parameters may be included separated with semi-colons (;))
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
param
bypassChecks if true, bypass the permission checks, used by the installer when redo old connections during an aborted update
exception
IllegalArgumentException if the connection string is not valid
exception
ConnectionNotFoundException if the runtime system does not support push delivery for the requested connection protocol
exception
IOException if the connection is already registered or if there are insufficient resources to handle the registration request
exception
ClassNotFoundException if the MIDlet class name can not be found in the current MIDlet suite
exception
SecurityException if the MIDlet does not have permission to register a connection
see
#unregisterConnection

        throw new ConnectionNotFoundException();
    
public static voidunregisterConnections(int id)
Unregister all the connections for a MIDlet suite.

param
id identifies the specific MIDlet suite