|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ocap.system.event.SystemEvent
public class SystemEvent
This class is the basis for system event messages. Applications cannot create this class directly, they must create one of the defined subclasses instead.
The event type code is defined with ranges reserved for specific types of events. Ranges defined for the implementation using "SYS" cannot be used by applications.
Ranges defined as "reserved" will be allocated by OCAP (or other future standards). Applications and OCAP implementations SHOULD NOT use these values until their meaning is standardized.
Values in a SYS range that are not reserved may be used by OCAP implementers - their meaning is implementation-dependent.
Values in an APP range that are not reserved may be used by OCAP applications - their
meaning is application-dependent. The getAppID()
method may be useful to
disambiguate these codes.
Informational events can be used for any information desired. Recoverable error events do not prevent an application or the implementation from continued execution. Catastrophic events generated by or on behalf of an application indicate that the application cannot continue execution and will be a cause for self-destruction. Reboot events generated by the implementation indicate that the implementation cannot continue execution and a system generated reboot is imminent.
Field Summary | |
---|---|
static int |
BEGIN_APP_CAT_ERROR_EVENT_TYPES
Start of range reserved for application generated catastrophic error events defined by OCAP. |
static int |
BEGIN_APP_CAT_ERROR_RESERVED_EVENT_TYPES
Start of range reserved for application generated catastrophic error events defined by OCAP. |
static int |
BEGIN_APP_INFO_EVENT_TYPES
Start of range for application generated informational events. |
static int |
BEGIN_APP_INFO_RESERVED_EVENT_TYPES
Start of range reserved for application generated informational events defined by OCAP. |
static int |
BEGIN_APP_REC_ERROR_EVENT_TYPES
Start of range for application generated recoverable error events. |
static int |
BEGIN_APP_REC_ERROR_RESERVED_EVENT_TYPES
Start of range reserved for application generated recoverable error events defined by OCAP. |
static int |
BEGIN_SYS_CAT_ERROR_EVENT_TYPES
Start of range for system generated catastrophic events. |
static int |
BEGIN_SYS_CAT_ERROR_RESERVED_EVENT_TYPES
Start of range reserved for system generated catastrophic error events defined by OCAP. |
static int |
BEGIN_SYS_DNLD_EVENT_TYPES
Start of range reserved for system generated deferred download events in response to a CVT signaling a deferred download. |
static int |
BEGIN_SYS_INFO_EVENT_TYPES
Start of range for system generated informational events. |
static int |
BEGIN_SYS_INFO_RESERVED_EVENT_TYPES
Start of range reserved for system generated informational events defined by OCAP. |
static int |
BEGIN_SYS_REBOOT_EVENT_TYPES
Start of range for system generated reboot events. |
static int |
BEGIN_SYS_REBOOT_RESERVED_EVENT_TYPES
Start of range reserved for system generated reboot events defined by OCAP. |
static int |
BEGIN_SYS_REC_ERROR_EVENT_TYPES
Start of range for system generated recoverable error events. |
static int |
BEGIN_SYS_REC_ERROR_RESERVED_EVENT_TYPES
Start of range reserved for system generated recoverable error events defined by OCAP. |
static int |
BEGIN_SYS_RES_DEP_EVENT_TYPES
Start of range for system generated resource depletion events. |
static int |
BEGIN_SYS_RES_DEP_RESERVED_EVENT_TYPES
Start of range reserved for system generated resource depletion events defined by OCAP. |
static int |
END_APP_CAT_ERROR_EVENT_TYPES
End of range for application generated catastrophic error events. |
static int |
END_APP_INFO_EVENT_TYPES
End of range for application generated informational events. |
static int |
END_APP_REC_ERROR_EVENT_TYPES
End of range for application generated recoverable error events. |
static int |
END_SYS_CAT_ERROR_EVENT_TYPES
End of range for system generated catastrophic error events. |
static int |
END_SYS_DNLD_EVENT_TYPES
End of range for system deferred download events. |
static int |
END_SYS_INFO_EVENT_TYPES
End of range for system generated informational events. |
static int |
END_SYS_REBOOT_EVENT_TYPES
End of range for system generated reboot events. |
static int |
END_SYS_REC_ERROR_EVENT_TYPES
End of range for system generated recoverable error events. |
static int |
END_SYS_RES_DEP_EVENT_TYPES
End of range for system generated resource depletion events. |
Constructor Summary | |
---|---|
protected |
SystemEvent(int typeCode)
System event constructor. |
protected |
SystemEvent(int typeCode,
java.lang.String message)
System event constructor with message. |
protected |
SystemEvent(int typeCode,
java.lang.String message,
long date,
AppID appId)
This constructor is provided for internal use by OCAP implementations; applications SHOULD NOT call it. |
Method Summary | |
---|---|
AppID |
getAppID()
Gets the globally unique identifier of the application logging the event. |
long |
getDate()
Gets the event date in milli-seconds from midnight January 1, 1970, GMT. |
java.lang.String |
getMessage()
Gets the readable message. |
int |
getTypeCode()
Gets the event type code. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BEGIN_SYS_INFO_EVENT_TYPES
public static final int BEGIN_SYS_INFO_RESERVED_EVENT_TYPES
END_SYS_INFO_EVENT_TYPES
.
public static final int END_SYS_INFO_EVENT_TYPES
public static final int BEGIN_APP_INFO_EVENT_TYPES
public static final int BEGIN_APP_INFO_RESERVED_EVENT_TYPES
END_APP_INFO_EVENT_TYPES
.
public static final int END_APP_INFO_EVENT_TYPES
public static final int BEGIN_SYS_REC_ERROR_EVENT_TYPES
These events may refer to a specific application, which will be identified by the
getAppID()
method, or may be internal system errors, in which case
getAppID()
will return null.
public static final int BEGIN_SYS_REC_ERROR_RESERVED_EVENT_TYPES
END_SYS_REC_ERROR_EVENT_TYPES
.
public static final int END_SYS_REC_ERROR_EVENT_TYPES
public static final int BEGIN_APP_REC_ERROR_EVENT_TYPES
This type of error is intended to indicate that something went wrong (e.g. a data file could not be loaded or a system call failed), but the application is designed to handle the error gracefully so does not need to terminate.
public static final int BEGIN_APP_REC_ERROR_RESERVED_EVENT_TYPES
END_APP_REC_ERROR_EVENT_TYPES
.
public static final int END_APP_REC_ERROR_EVENT_TYPES
public static final int BEGIN_SYS_CAT_ERROR_EVENT_TYPES
These the events are generated by the system when it detects a
catastrophic failure that will cause (or has caused) the application identified
by the getAppID()
method to be terminated.
These events may also be internal system errors, in which case
getAppID()
will return null.
public static final int BEGIN_SYS_CAT_ERROR_RESERVED_EVENT_TYPES
END_SYS_CAT_ERROR_EVENT_TYPES
.
public static final int END_SYS_CAT_ERROR_EVENT_TYPES
public static final int BEGIN_APP_CAT_ERROR_EVENT_TYPES
END_APP_CAT_ERROR_EVENT_TYPES
.
public static final int BEGIN_APP_CAT_ERROR_RESERVED_EVENT_TYPES
END_APP_CAT_ERROR_EVENT_TYPES
.
public static final int END_APP_CAT_ERROR_EVENT_TYPES
public static final int BEGIN_SYS_REBOOT_EVENT_TYPES
public static final int BEGIN_SYS_REBOOT_RESERVED_EVENT_TYPES
END_SYS_REBOOT_EVENT_TYPES
.
public static final int END_SYS_REBOOT_EVENT_TYPES
public static final int BEGIN_SYS_RES_DEP_EVENT_TYPES
public static final int BEGIN_SYS_RES_DEP_RESERVED_EVENT_TYPES
END_SYS_RES_DEP_EVENT_TYPES
.
public static final int END_SYS_RES_DEP_EVENT_TYPES
public static final int BEGIN_SYS_DNLD_EVENT_TYPES
END_SYS_DNLD_EVENT_TYPES
.
public static final int END_SYS_DNLD_EVENT_TYPES
Constructor Detail |
---|
protected SystemEvent(int typeCode)
typeCode
- - Unique event type.
java.lang.IllegalArgumentException
- if the typeCode is not in a defined application range
when the event is created by an application.protected SystemEvent(int typeCode, java.lang.String message)
typeCode
- - Unique event type.message
- - Readable message specific to the event generator.
java.lang.IllegalArgumentException
- if the typeCode is not in a defined application range
when the event is created by an application.protected SystemEvent(int typeCode, java.lang.String message, long date, AppID appId)
typeCode
- - The unique error type code.message
- - Readable message specific to the event generator.date
- - Event date in milli-seconds from midnight January 1, 1970 GMT.appId
- - The Id of the application logging the event.
java.lang.SecurityException
- if this constructor is called by any application.Method Detail |
---|
public AppID getAppID()
public int getTypeCode()
public long getDate()
public java.lang.String getMessage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |