|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ocap.system.event.SystemEventManager
public abstract class SystemEventManager
Registration mechanism for trusted applications to set the error handler.
Field Summary | |
---|---|
static int |
DEFERRED_DOWNLOAD_EVENT_LISTENER
Identifies the deferred download event listener. |
static int |
ERROR_EVENT_LISTENER
Identifies the system error event listener. |
static int |
REBOOT_EVENT_LISTENER
Identifies the reboot event listener. |
static int |
RESOURCE_DEPLETION_EVENT_LISTENER
Identifies the system resource depletion event listener. |
Constructor Summary | |
---|---|
protected |
SystemEventManager()
This constructor must not be used by OCAP applications. |
Method Summary | |
---|---|
static SystemEventManager |
getInstance()
Gets the singleton instance of the system event manager. |
abstract void |
log(SystemEvent event)
Logs an event. |
abstract void |
setEventListener(int type,
SystemEventListener sel)
Set the system event listener specified by type and the new handler. |
abstract void |
unsetEventListener(int type)
Unset the system event handler specified by type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERROR_EVENT_LISTENER
setEventListener(int, org.ocap.system.event.SystemEventListener)
,
Constant Field Valuespublic static final int REBOOT_EVENT_LISTENER
setEventListener(int,org.ocap.system.event.SystemEventListener)
,
Constant Field Valuespublic static final int RESOURCE_DEPLETION_EVENT_LISTENER
setEventListener(int,org.ocap.system.event.SystemEventListener)
,
Constant Field Valuespublic static final int DEFERRED_DOWNLOAD_EVENT_LISTENER
setEventListener(int, org.ocap.system.event.SystemEventListener)
,
Constant Field ValuesConstructor Detail |
---|
protected SystemEventManager()
Method Detail |
---|
public static SystemEventManager getInstance()
public abstract void setEventListener(int type, SystemEventListener sel)
type
- - ERROR_EVENT_LISTENER
, REBOOT_EVENT_LISTENER
,
RESOURCE_DEPLETION_EVENT_LISTENER
, or DEFERRED_DOWNLOAD_EVENT_LISTENER
.sel
- - System event listener created by the registering application.
java.lang.SecurityException
- if the application does not have
MonitorAppPermission("systemevent")
java.lang.IllegalArgumentException
- if type is not one of
ERROR_EVENT_LISTENER
,
REBOOT_EVENT_LISTENER
,
RESOURCE_DEPLETION_EVENT_LISTENER
, or
DEFERRED_DOWNLOAD_EVENT_LISTENER
.public abstract void unsetEventListener(int type)
type
- - One of ERROR_EVENT_LISTENER
,
REBOOT_EVENT_LISTENER
,
RESOURCE_DEPLETION_EVENT_LISTENER
, or
DEFERRED_DOWNLOAD_EVENT_LISTENER
java.lang.SecurityException
- if the application does not have
MonitorAppPermission("systemevent")public abstract void log(SystemEvent event)
event
- - The event to log.
java.lang.IllegalArgumentException
- if the event parameter is an instance of
an application defined class (i.e., applications cannot define their own subclasses
of SystemEvent and use them with this method. This is due to implementation and
security issues).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |