com.tivoli.twg.evtsub
Class TWGEventDescriptor

java.lang.Object
  extended bycom.tivoli.twg.evtsub.TWGEventDescriptor

public class TWGEventDescriptor
extends java.lang.Object


Constructor Summary
TWGEventDescriptor()
           
TWGEventDescriptor(IntelByteBuffer buf)
          Constructor for interpreting a provided IntelByteBuffer.
TWGEventDescriptor(IntelByteBuffer buf, int off)
          Constructor for interpreting a provided IntelByteBuffer at a given offset.
TWGEventDescriptor(java.lang.String family, java.lang.String[] qualifiers)
          Constructor.
TWGEventDescriptor(TWGEventDescriptor esd)
          Copy Constructor.
 
Method Summary
 boolean contains(java.lang.Object obj)
          Compare this object with another TWGEventDescriptor object.
 boolean equals(java.lang.Object obj)
          Compare this object with another TWGEventDescriptor object.
 java.lang.String getFamily()
          Get family.
 int getFlags()
          Get flags.
 java.lang.String[] getQualifiers()
          Get qualifiers.
 int hashCode()
          Return a hashcode.
 int readTWGEventDescriptor(IntelByteBuffer buf, int off)
          Method for interpreting a provided IntelByteBuffer at a given offset.
 int sizeOf()
          Determine the size of the entire object.
 int sizeOfTWGEventDescriptor()
          Determine the size of the entire object.
 IntelByteBuffer toIntelByteBuffer()
          Convert the object into IntelByteBuffer representation.
 java.lang.String toString()
          Create a string.
 int writeIntelByteBuffer(IntelByteBuffer buf)
          Write contents of this object into an IntelByteBuffer.
 int writeIntelByteBuffer(IntelByteBuffer buf, int off)
          Write object into provided IntelByteBuffer starting at a given offset.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TWGEventDescriptor

public TWGEventDescriptor()

TWGEventDescriptor

public TWGEventDescriptor(java.lang.String family,
                          java.lang.String[] qualifiers)
Constructor.

Parameters:
family - major category of event source
qualifiers - language nuetral array of strings describing event source

TWGEventDescriptor

public TWGEventDescriptor(TWGEventDescriptor esd)
Copy Constructor.

Parameters:
esd - event descriptor to be copied

TWGEventDescriptor

public TWGEventDescriptor(IntelByteBuffer buf)
Constructor for interpreting a provided IntelByteBuffer. Use the current offset and start ptrs within the provided IntelByteBuffer; upon return the buffer's offset ptr is advanced to reflect the number of bytes read.

Parameters:
buf - IntelByteBuffer from which data should be read

TWGEventDescriptor

public TWGEventDescriptor(IntelByteBuffer buf,
                          int off)
Constructor for interpreting a provided IntelByteBuffer at a given offset.

Parameters:
buf - IntelByteBuffer from which data should be read
off - offset from the current relative start of the provided IntelByteBuffer
Method Detail

getFamily

public java.lang.String getFamily()
Get family.

Returns:
family string

getQualifiers

public java.lang.String[] getQualifiers()
Get qualifiers.

Returns:
array of event source qualifiers

getFlags

public int getFlags()
Get flags.

Returns:
flags as an integer

equals

public boolean equals(java.lang.Object obj)
Compare this object with another TWGEventDescriptor object.

Parameters:
obj - TWGEventDescriptor to compare this with
Returns:
true if objects are equal; false if not

contains

public boolean contains(java.lang.Object obj)
Compare this object with another TWGEventDescriptor object.

Parameters:
obj - TWGEventDescriptor to compare this with
Returns:
true if this contains the other; false if not

hashCode

public int hashCode()
Return a hashcode.

Returns:
hash code value for this object

toString

public java.lang.String toString()
Create a string.

Returns:
object as a string

sizeOf

public int sizeOf()
Determine the size of the entire object.

Returns:
number of bytes that comprise the object

sizeOfTWGEventDescriptor

public int sizeOfTWGEventDescriptor()
Determine the size of the entire object.

Returns:
number of bytes that comprise the object

toIntelByteBuffer

public IntelByteBuffer toIntelByteBuffer()
Convert the object into IntelByteBuffer representation.

Returns:
IntelByteBuffer representing the encoded object

writeIntelByteBuffer

public int writeIntelByteBuffer(IntelByteBuffer buf)
Write contents of this object into an IntelByteBuffer. Use the current offset and start ptrs within the provided IntelByteBuffer; upon return the buffer's offset ptr is advanced to reflect the number of bytes written.

Parameters:
buf - IntelByteBuffer into which data should be written
Returns:
original offset plus number of bytes written

writeIntelByteBuffer

public int writeIntelByteBuffer(IntelByteBuffer buf,
                                int off)
Write object into provided IntelByteBuffer starting at a given offset. Use the current offset and start ptrs within the provided IntelByteBuffer to determine a relative start ptr and begin writing off bytes from that location. Return the buffer's offset ptr advanced to reflect the number of bytes written.

Parameters:
buf - IntelByteBuffer into which data should be written
off - offset from the current relative start of the provided IntelByteBuffer
Returns:
number of bytes written

readTWGEventDescriptor

public int readTWGEventDescriptor(IntelByteBuffer buf,
                                  int off)
Method for interpreting a provided IntelByteBuffer at a given offset.

Parameters:
buf - IntelByteBuffer from which data should be read
off - offset from the current relative start of the provided IntelByteBuffer
Returns:
number of bytes read while interpreting the buffer