FileDocCategorySizeDatePackage
NetworkSubsystem.javaAPI DocphoneME MR2 API (J2ME)2468Wed May 02 18:00:10 BST 2007com.sun.midp.suspend

NetworkSubsystem

public class NetworkSubsystem extends AbstractSubsystem
Processes suspend/resume requests for networking resources.

Fields Summary
private static NetworkSubsystem
instance
The only instance of the subsytem.
Constructors Summary
private NetworkSubsystem()
Constructs an instance in registers it in the suspend system.


                   
      
        state = ACTIVE;
        SuspendSystem.getInstance(classSecurityToken).registerSubsystem(this);
    
Methods Summary
public synchronized voidensureActive()
Checks that networking subsystem is in either active or resuming state and throws IOException if it is not.

throws
IOException if the networking subsystem state is neither ACTIVE nor RESUMING.

        if (state != ACTIVE && state != RESUMING) {
            throw new IOException("Networking is not active");
        }
    
public static com.sun.midp.suspend.NetworkSubsystemgetInstance(com.sun.midp.security.SecurityToken token)
Returns te only instance.

return
the singleton instance
param
token security token that identifies caller access rights

        token.checkIfPermissionAllowed(Permissions.MIDP);
        return instance;