Methods Summary |
---|
public void | addListener(SuspendSystemListener listener)Registers a listener interested in system suspend/resume operations.
IMPL_NOTE: method for removing listeners is not needed currently.
synchronized (listeners) {
listeners.addElement(listener);
}
|
public static com.sun.midp.suspend.SuspendSystem | getInstance(com.sun.midp.security.SecurityToken token)Retrieves the singleton instance.
token.checkIfPermissionAllowed(Permissions.MIDP);
return instance;
|
static com.sun.midp.suspend.SuspendSystem | getInstance()Retrieves the singleton instance. The method is only available from
this restricted package.
return instance;
|
protected void | resumed()Notifies listeners of system resume.
synchronized (listeners) {
for (int i = listeners.size() - 1; i >= 0; i-- ) {
SuspendSystemListener listener =
(SuspendSystemListener)listeners.elementAt(i);
listener.midpResumed();
}
}
|
protected void | suspended()Notifies listeners of system suspend.
synchronized (listeners) {
for (int i = listeners.size() - 1; i >= 0; i-- ) {
SuspendSystemListener listener =
(SuspendSystemListener)listeners.elementAt(i);
listener.midpSuspended();
}
}
|