|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.alertmgr.TWGPartialEvent
TWGPartialEvent is the subcomponent TWGBaseEvent used to contain the most common characteristics of a Director event. The scope of the data available here is equivalent to the data displayed in the Event Log table (non-detail view).
Field Summary | |
---|---|
static java.lang.String |
ACTION
|
static java.lang.String |
BOSSMAN
|
static int |
CATEGORY_COUNT
|
static int |
EVENT_CATEGORY_ALERT
|
static int |
EVENT_CATEGORY_RESOLUTION
|
static int |
EVENT_FLAGS_ALERT
|
static int |
EVENT_FLAGS_CHILD
|
static int |
EVENT_FLAGS_FAILOVER_COPY
|
static int |
EVENT_FLAGS_FORWARDED
|
static int |
EVENT_FLAGS_OUT_OF_BAND
|
static int |
EVENT_FLAGS_QUEUED
|
static int |
EVENT_FLAGS_RESENT
|
static int |
EVENT_FLAGS_RESOLUTION
|
static short |
EVENT_SEVERITY_CRITICAL
|
static short |
EVENT_SEVERITY_FATAL
|
static short |
EVENT_SEVERITY_HARMLESS
|
static short |
EVENT_SEVERITY_MINOR
|
static short |
EVENT_SEVERITY_UNKNOWN
|
static short |
EVENT_SEVERITY_WARNING
|
static java.lang.String |
EVENT_TYPE_DELIMITER
|
static short |
SEVERITY_COUNT
|
static java.lang.String |
SNMP
|
static java.lang.String |
TEC
|
static java.lang.String |
TEST
|
Constructor Summary | |
---|---|
TWGPartialEvent(IntelByteBuffer buf)
Constructor for interpreting a provided IntelByteBuffer. |
|
TWGPartialEvent(IntelByteBuffer buf,
int off)
Constructor for interpreting a provided IntelByteBuffer at a given offset. |
|
TWGPartialEvent(java.lang.String family,
java.lang.String[] qualifiers,
short severity,
long groupId,
long managedObjectId,
java.lang.String textTemplate,
java.util.Locale textLocale,
java.lang.Object[] subVars,
int flags)
Constructor - general constructor for use by other constructors |
|
TWGPartialEvent(TWGPartialEvent partialEvent)
Copy Constructor |
Method Summary | |
---|---|
static long |
bytesToLong(byte[] buf)
Convert byte array into a long |
static long |
bytesToLong(byte[] buf,
int begin,
int len)
Convert byte array into a long |
static long |
generateEventId()
Generate an event id using the current serverId, processId, and InstanceId |
int |
getCategory()
|
static int |
getCategoryCount()
Get the number of architected event categories |
long[] |
getChildEventIds()
Get child event ids |
java.util.Date |
getDate()
Get the time/date of the event |
long |
getDateAsLong()
Get the time/date of the event |
static int |
getDaysIndex(long eventId)
Extract the day index from the given event id |
long |
getEventId()
Get event id |
int |
getFlags()
Get the flags of the event |
long |
getGroupId()
Get the persistent object id associated with the group of which this managed object is a member |
java.lang.String |
getGroupName()
Get the name associated with the group object id included in the event |
long |
getKey()
Get the datastore key associated with this event record |
long |
getManagedObjectId()
Get the persistent object id associated with this target of the event |
java.lang.String |
getManagedObjectName()
Get the name associated with the managed object id targeted in the event |
int |
getNumChildEventIds()
Get the number of child event ids |
int |
getNumSubVars()
Get the number of text substitution strings |
int |
getNumTypeQualifiers()
Get the number of qualifiers in the event type (not including family) |
java.lang.String |
getSenderName()
Get the name associated with the system that originated the event |
short |
getSeverity()
Get the severity of the event |
static int |
getSeverityCount()
Get the number of architected event severities |
java.util.Locale |
getSourceLocale()
Get the locale of the text provided in the event (this method retired) |
java.lang.Object |
getSubVar(int index)
Get the text parm referenced by given index |
java.lang.Object[] |
getSubVars()
Get the array of text parms |
java.lang.String |
getText()
Get the formatted text of the event |
java.lang.String |
getTextBundleName()
Get the name of the resource bundle associated with the text template |
java.lang.String |
getTextKeyword()
Get the keyword associated with the text template |
java.util.Locale |
getTextLocale()
Get the locale of the text provided in the event |
java.lang.String |
getTextTemplate()
Get the raw text template in the event |
java.lang.String |
getType()
Get the fully qualified (programmatic) event type string |
java.lang.String[] |
getTypeArray()
Get the fully qualified (programmatic) event type as an array |
java.lang.String |
getTypeFamily()
Get the highest level qualifier of the event type |
protected java.lang.String |
getTypeQualifier(int index)
Get the type qualifier referenced by given index |
java.lang.String[] |
getTypeQualifiers()
Get the array of event type qualifiers |
java.lang.String |
getUglyType()
Get the fully qualified (programmatic) event type string |
boolean |
isaChildEvent()
Get child event indicator |
boolean |
isaFailoverCopy()
Get failover copy indicator |
boolean |
isaForwardedEvent()
Get forwarded event indicator |
boolean |
isanOutOfBandEvent()
Get out-of-band event indicator Used only by Director Comprehensive Event/Director Lan Event generators Only events from these sources will have this value as boolean true |
boolean |
isaQueuedEvent()
Get queued event indicator |
boolean |
isaSummaryEvent()
Check if this is a summary event |
boolean |
isResent()
Get resent event indicator |
void |
print()
Print the contents of the TWGPartialEvent object |
int |
readTWGPartialEvent(IntelByteBuffer buf,
int off)
Method for interpreting a provided IntelByteBuffer at a given offset. |
void |
setChildEvent(boolean b)
Set child event indicator On or Off |
void |
setChildEventIds(long[] ids)
Set child event ids |
void |
setDate(long date)
Set the time/date of the event |
void |
setEventId(long id)
Set event id |
void |
setFailoverCopy(boolean b)
Set failover copy indicator On or Off |
void |
setForwardedEvent()
Set forwarded event indicator On |
void |
setForwardedEvent(boolean b)
Set forwarded event indicator On or Off |
void |
setGroupId(long grpId)
Set the persistent object id associated with the group of which this managed object is a member |
void |
setGroupName(java.lang.String name)
Set the name associated with the group object id included in the event |
void |
setKey(long key)
Set the datastore key associated with this event record |
void |
setLocalizedTypeFamily(java.lang.String f)
Set the localized version of the event type family. |
void |
setManagedObjectId(long mo)
Set the persistent object id associated with this target of the event |
void |
setManagedObjectName(java.lang.String name)
Set the name associated with the managed object id targeted in the event |
void |
setOutOfBandEvent()
Set out-of-band event indicator On This method is to be used only by Director Comprehensive Event/Director Lan Event generators that send out of band events with 'anything' in sender name. |
void |
setOutOfBandEvent(boolean b)
Set out-of-band event indicator On or Off This method is to be used only by Director Comprehensive Event/Director Lan Event generators that send out of band events with 'anything' in sender name. |
void |
setQueuedEvent()
Set queued event indicator On |
void |
setQueuedEvent(boolean b)
Set queued event indicator On or Off |
void |
setReplacementQualifiers(java.lang.String[] qualifiers)
Set the localized version of the event type qualifiers. |
void |
setResent()
Set resent indicator on |
void |
setSenderName(java.lang.String name)
Set the name associated with the system that originated the event |
static void |
setServerId(java.lang.String id)
Set the Server id of this system (This is assumed to be a system unique identifier) |
void |
setSeverity(short severity)
Set the severity of the event |
void |
setSourceLocale(java.util.Locale locale)
Set the locale of the text provided in the event (this method retired) |
void |
setSubVars(java.lang.Object[] parms)
Set the array of substitution parms that should be merged with the text template to form the text of the event. |
protected void |
setTextBundleName(java.lang.String bundleName)
Set the name of the resource bundle associated with the text template |
protected void |
setTextKeyword(java.lang.String keyword)
Set the keyword associated with the text template |
void |
setTextKeywordAndBundleName(java.lang.String keyword,
java.lang.String bundleName)
Set the keyword and bundle name associated with the text template |
void |
setTextLocale(java.util.Locale locale)
Set the locale of the text provided in the event |
void |
setTextTemplate(java.lang.String textTemplate)
Set the raw text template in the event |
void |
setTypeQualifiers(java.lang.String[] qualifiers)
Set the 2-n level qualifiers of the event type |
int |
sizeOf()
Determine the size of the entire TWGPartialEvent object |
static int |
sizeOfHdr()
Determine the size of the TWGPartialEvent header |
int |
sizeOfTWGPartialEvent()
Determine the size of the entire TWGPartialEvent object |
IntelByteBuffer |
toIntelByteBuffer()
Convert the TWGPartialEvent into IntelByteBuffer representation. |
java.lang.String |
toString()
|
java.lang.String |
toStringCategory()
Get the string equivalent of the event category (assuming the default locale) |
static java.lang.String |
toStringCategory(int cat)
Get the string equivalent of a given event category (assuming the default locale) |
static java.lang.String |
toStringCategory(int index,
java.util.Locale locale)
Get the string equivalent of a given event category and locale |
java.lang.String |
toStringFlags()
Convert the current flag settings to their string equivalents |
java.lang.String |
toStringSeverity()
Get the string equivalent of the event severity (assuming the default locale) |
static java.lang.String |
toStringSeverity(int sev)
Get the string equivalent of a given event severity (assuming the default locale) |
static java.lang.String |
toStringSeverity(int index,
java.util.Locale locale)
Get the string equivalent of a given event severity and locale |
int |
writeIntelByteBuffer(IntelByteBuffer buf)
Write contents of this object into an IntelByteBuffer. |
int |
writeIntelByteBuffer(IntelByteBuffer buf,
int off)
Write action parm into provided IntelByteBuffer starting at a given offset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String BOSSMAN
public static final java.lang.String SNMP
public static final java.lang.String TEC
public static final java.lang.String TEST
public static final java.lang.String ACTION
public static final java.lang.String EVENT_TYPE_DELIMITER
public static final short SEVERITY_COUNT
public static final short EVENT_SEVERITY_FATAL
public static final short EVENT_SEVERITY_CRITICAL
public static final short EVENT_SEVERITY_MINOR
public static final short EVENT_SEVERITY_WARNING
public static final short EVENT_SEVERITY_HARMLESS
public static final short EVENT_SEVERITY_UNKNOWN
public static final int CATEGORY_COUNT
public static final int EVENT_CATEGORY_ALERT
public static final int EVENT_CATEGORY_RESOLUTION
public static final int EVENT_FLAGS_ALERT
public static final int EVENT_FLAGS_RESOLUTION
public static final int EVENT_FLAGS_QUEUED
public static final int EVENT_FLAGS_FAILOVER_COPY
public static final int EVENT_FLAGS_FORWARDED
public static final int EVENT_FLAGS_CHILD
public static final int EVENT_FLAGS_OUT_OF_BAND
public static final int EVENT_FLAGS_RESENT
Constructor Detail |
public TWGPartialEvent(java.lang.String family, java.lang.String[] qualifiers, short severity, long groupId, long managedObjectId, java.lang.String textTemplate, java.util.Locale textLocale, java.lang.Object[] subVars, int flags)
family
- String representing the highest level qualifier of the event typequalifiers
- Array of strings comprising the remainder of the event typeseverity
- Severity of the event (inplies urgency)groupId
- Persistent object id of group object that contains this managed objectmanagedObjectId
- Persistent object id of managed object (who the event is about)textTemplate
- template for the text of the eventtextLocale
- locale of the text templatesubVars
- Array of objects that replace the variables of the text template
to form the text.flags
- Bit fields for various things.
java.lang.NullPointerException
- if family or qualifiers are null
java.lang.IllegalArgumentException
- if no qualifiers specifiedpublic TWGPartialEvent(TWGPartialEvent partialEvent)
partialEvent
- partial event to be copiedpublic TWGPartialEvent(IntelByteBuffer buf)
buf
- IntelByteBuffer from which data should be readpublic TWGPartialEvent(IntelByteBuffer buf, int off)
buf
- IntelByteBuffer from which data should be readoff
- offset from the current relative start of the provided IntelByteBufferMethod Detail |
public long getKey()
public void setKey(long key)
key
- long key of the recordpublic long getManagedObjectId()
public void setManagedObjectId(long mo)
mo
- persistent object id assocaiated with the taret of the eventpublic long getGroupId()
public void setGroupId(long grpId)
grpId
- persistent object id associated with the group of which this managed object is a memberpublic java.lang.String getManagedObjectName()
public void setManagedObjectName(java.lang.String name)
name
- associated with the managed object id targeted in the eventpublic java.lang.String getGroupName()
public void setGroupName(java.lang.String name)
public void setTypeQualifiers(java.lang.String[] qualifiers)
public void setLocalizedTypeFamily(java.lang.String f)
public void setReplacementQualifiers(java.lang.String[] qualifiers)
public void setSubVars(java.lang.Object[] parms)
public short getSeverity()
public void setSeverity(short severity)
severity
- severity of the event as a shortpublic int getFlags()
public boolean isaQueuedEvent()
public void setQueuedEvent()
public void setQueuedEvent(boolean b)
public boolean isaFailoverCopy()
public void setFailoverCopy(boolean b)
public boolean isaForwardedEvent()
public void setForwardedEvent()
public void setForwardedEvent(boolean b)
public boolean isaChildEvent()
public void setChildEvent(boolean b)
public boolean isanOutOfBandEvent()
public boolean isResent()
public void setOutOfBandEvent()
public void setResent()
public void setOutOfBandEvent(boolean b)
public java.lang.String getTypeFamily()
public int getNumTypeQualifiers()
public int getNumSubVars()
public java.lang.String[] getTypeQualifiers()
public java.lang.Object[] getSubVars()
protected java.lang.String getTypeQualifier(int index)
index
- index of qualifier
public java.lang.Object getSubVar(int index)
index
- index of parm
public java.lang.String getText()
public java.lang.String getTextTemplate()
public void setTextTemplate(java.lang.String textTemplate)
public java.lang.String getTextBundleName()
protected void setTextBundleName(java.lang.String bundleName)
bundleName
- name of the resource bundle contining the text templatepublic java.lang.String getTextKeyword()
protected void setTextKeyword(java.lang.String keyword)
keyword
- keyword associated with the text templatepublic void setTextKeywordAndBundleName(java.lang.String keyword, java.lang.String bundleName)
keyword
- keyword associated with the text templatebundleName
- name of the resource bundle containing the text templatepublic java.util.Locale getSourceLocale()
public void setSourceLocale(java.util.Locale locale)
public java.util.Locale getTextLocale()
public void setTextLocale(java.util.Locale locale)
public java.lang.String getType()
public java.lang.String[] getTypeArray()
public java.lang.String getUglyType()
public long getDateAsLong()
public java.util.Date getDate()
public void setDate(long date)
public java.lang.String getSenderName()
public void setSenderName(java.lang.String name)
name
- of the system that originated the eventpublic long getEventId()
public void setEventId(long id)
id
- id of the eventpublic int getNumChildEventIds()
public long[] getChildEventIds()
public void setChildEventIds(long[] ids)
ids
- ids of child eventspublic boolean isaSummaryEvent()
public static int getSeverityCount()
public java.lang.String toStringSeverity()
public static java.lang.String toStringSeverity(int sev)
sev
- numerical equivalent of severity
public static java.lang.String toStringSeverity(int index, java.util.Locale locale)
index
- numerical equivalent of severitylocale
- desired locale of severity
public java.lang.String toStringFlags()
public IntelByteBuffer toIntelByteBuffer()
public int writeIntelByteBuffer(IntelByteBuffer buf)
buf
- IntelByteBuffer into which data should be written
public int writeIntelByteBuffer(IntelByteBuffer buf, int off)
buf
- IntelByteBuffer into which data should be writtenoff
- offset from the current relative start of the provided IntelByteBuffer
public int readTWGPartialEvent(IntelByteBuffer buf, int off)
buf
- IntelByteBuffer from which data should be readoff
- offset from the current relative start of the provided IntelByteBuffer
public int sizeOf()
public static int sizeOfHdr()
public int sizeOfTWGPartialEvent()
public int getCategory()
public static int getCategoryCount()
public java.lang.String toStringCategory()
public static java.lang.String toStringCategory(int cat)
cat
- numerical equivalent of category
public static java.lang.String toStringCategory(int index, java.util.Locale locale)
index
- numerical equivalent of categorylocale
- desired locale of category
public void print()
public java.lang.String toString()
public static long generateEventId()
public static void setServerId(java.lang.String id)
id
- - unique identifier for this systempublic static int getDaysIndex(long eventId)
public static long bytesToLong(byte[] buf, int begin, int len)
buf
- - buffer to be convertedbegin
- - index to startlen
- - length to convertpublic static long bytesToLong(byte[] buf)
buf
- - buffer to be converted
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |