com.tivoli.twg.alertmgr
Class TWGActionEndInfo

java.lang.Object
  extended bycom.tivoli.twg.alertmgr.TWGActionEndInfo
All Implemented Interfaces:
java.io.Serializable

public class TWGActionEndInfo
extends java.lang.Object
implements java.io.Serializable

TWGActionEndInfo contains information about the completion of an action.

See Also:
Serialized Form

Field Summary
static long ACTION_FAILED
          Action status - failed
static long ACTION_NOT_PERFORMED
          Action status - not performed
static long ACTION_STATUS_UNKNOWN
          Action status - unknown
static long ACTION_SUCCESSFUL
          Action status - successful
 
Constructor Summary
TWGActionEndInfo(IntelByteBuffer buf)
          Constructor for reading data from an IntelByteBuffer at current offset and advance offset.
TWGActionEndInfo(IntelByteBuffer buf, int off)
          Constructor for reading data from an IntelByteBuffer at given offset.
TWGActionEndInfo(long key, long status)
          Constructor for providing a status only.
TWGActionEndInfo(long key, long status, java.lang.String msgKey)
          Constructor for providing a status and an message.
TWGActionEndInfo(long key, long status, java.lang.String msgKey, java.lang.String bundleName)
          Constructor for providing a status and an message from a resource bundle.
TWGActionEndInfo(long key, long status, java.lang.String msgKey, java.lang.String bundleName, java.lang.String[] msgParms)
          Constructor for providing a status and an message from a resource bundle.
 
Method Summary
 long getKey()
          Get log entry key.
 java.lang.String getMessage(java.util.Locale locale)
          Get message in given locale.
 java.lang.String getMessageBundleName()
          Get message resource bundle name.
 java.lang.String getMessageKey()
          Get message key.
 java.lang.String[] getMessageParms()
          Get message parms.
 long getStatus()
          Get action end status.
 java.util.Date getTime()
          Get action end time.
 void print()
          Print the information.
 int readActionEndInfo(IntelByteBuffer buf, int off)
          Read data from an IntelByteBuffer at given offset.
 int sizeOfActionEndInfo()
          Size of the object.
static int sizeOfHeader()
          Size of the header.
 IntelByteBuffer toIntelByteBuffer()
          Convert to IntelByteBuffer.
 java.lang.String toStringStatus()
          Convert status to string in default locale.
static java.lang.String toStringStatus(long status)
          Convert a status to string in default locale.
static java.lang.String toStringStatus(long status, java.util.Locale locale)
          Convert a status to string in given locale.
 int writeIntelByteBuffer(IntelByteBuffer buf)
          Write data into an IntelByteBuffer at current offset and advance offset.
 int writeIntelByteBuffer(IntelByteBuffer buf, int off)
          Write data into an IntelByteBuffer at given offset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_SUCCESSFUL

public static final long ACTION_SUCCESSFUL
Action status - successful

See Also:
Constant Field Values

ACTION_FAILED

public static final long ACTION_FAILED
Action status - failed

See Also:
Constant Field Values

ACTION_NOT_PERFORMED

public static final long ACTION_NOT_PERFORMED
Action status - not performed

See Also:
Constant Field Values

ACTION_STATUS_UNKNOWN

public static final long ACTION_STATUS_UNKNOWN
Action status - unknown

See Also:
Constant Field Values
Constructor Detail

TWGActionEndInfo

public TWGActionEndInfo(long key,
                        long status)
Constructor for providing a status only.

Parameters:
key - log key
status - action status

TWGActionEndInfo

public TWGActionEndInfo(long key,
                        long status,
                        java.lang.String msgKey)
Constructor for providing a status and an message.

Parameters:
key - log key
status - action status
msgKey - message, or key to get message from an internal resource bundle

TWGActionEndInfo

public TWGActionEndInfo(long key,
                        long status,
                        java.lang.String msgKey,
                        java.lang.String bundleName)
Constructor for providing a status and an message from a resource bundle.

Parameters:
key - log key
status - action status
msgKey - key to get message from the resource bundle
bundleName - name of the resource bundle

TWGActionEndInfo

public TWGActionEndInfo(long key,
                        long status,
                        java.lang.String msgKey,
                        java.lang.String bundleName,
                        java.lang.String[] msgParms)
Constructor for providing a status and an message from a resource bundle. The message in the resource bundle is a template with place holders such as {0}, {1}, ..., which will be substituted by msgParms[0], msgParms[1], ....

Parameters:
key - log key
status - action status
msgKey - key to get message from the resource bundle
bundleName - name of the resource bundle
msgParms - parameters used to format the message

TWGActionEndInfo

public TWGActionEndInfo(IntelByteBuffer buf)
Constructor for reading data from an IntelByteBuffer at current offset and advance offset.

Parameters:
buf - buffer

TWGActionEndInfo

public TWGActionEndInfo(IntelByteBuffer buf,
                        int off)
Constructor for reading data from an IntelByteBuffer at given offset.

Parameters:
buf - buffer
off - offset to the start of data
Method Detail

readActionEndInfo

public int readActionEndInfo(IntelByteBuffer buf,
                             int off)
Read data from an IntelByteBuffer at given offset.

Parameters:
buf - buffer
off - offset to the start of data
Returns:
offset past the end of data

sizeOfHeader

public static int sizeOfHeader()
Size of the header.

Returns:
size

sizeOfActionEndInfo

public int sizeOfActionEndInfo()
Size of the object.

Returns:
size

toIntelByteBuffer

public IntelByteBuffer toIntelByteBuffer()
Convert to IntelByteBuffer.

Returns:
IntelByteBuffer

writeIntelByteBuffer

public int writeIntelByteBuffer(IntelByteBuffer buf)
Write data into an IntelByteBuffer at current offset and advance offset.

Parameters:
buf - buffer
Returns:
new offset

writeIntelByteBuffer

public int writeIntelByteBuffer(IntelByteBuffer buf,
                                int off)
Write data into an IntelByteBuffer at given offset.

Parameters:
buf - buffer
off - offset to the start of data
Returns:
offset past the end of data

getKey

public long getKey()
Get log entry key.

Returns:
key

getTime

public java.util.Date getTime()
Get action end time.

Returns:
time

getStatus

public long getStatus()
Get action end status.

Returns:
status

getMessageKey

public java.lang.String getMessageKey()
Get message key.

Returns:
key

getMessageBundleName

public java.lang.String getMessageBundleName()
Get message resource bundle name.

Returns:
name

getMessageParms

public java.lang.String[] getMessageParms()
Get message parms.

Returns:
parms

getMessage

public java.lang.String getMessage(java.util.Locale locale)
Get message in given locale.

Returns:
message

toStringStatus

public java.lang.String toStringStatus()
Convert status to string in default locale.

Returns:
string

toStringStatus

public static java.lang.String toStringStatus(long status)
Convert a status to string in default locale.

Returns:
string

toStringStatus

public static java.lang.String toStringStatus(long status,
                                              java.util.Locale locale)
Convert a status to string in given locale.

Returns:
string

print

public void print()
Print the information.