com.tivoli.twg.evtsub
Class TWGEventSourceDescriptor

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

public class TWGEventSourceDescriptor
extends java.lang.Object


Constructor Summary
TWGEventSourceDescriptor()
           
TWGEventSourceDescriptor(IntelByteBuffer buf)
          Constructor for interpreting a provided IntelByteBuffer.
TWGEventSourceDescriptor(IntelByteBuffer buf, int off)
          Constructor for interpreting a provided IntelByteBuffer at a given offset.
TWGEventSourceDescriptor(java.lang.String family, java.lang.String[] qualifiers, java.lang.String[] pnames, java.util.Locale locale, int version)
          Constructor.
TWGEventSourceDescriptor(TWGEventSourceDescriptor esd)
          Copy Constructor.
 
Method Summary
 void addDetail(TWGEventSourceDetail detail)
          Add a detail.
 TWGEventSourceDetail[] getDetails()
          Get details.
 java.lang.String getFamily()
          Get family.
 int getFlags()
          Get flags.
 java.util.Locale getLocale()
          Get locale.
 java.lang.String[] getPresentationNames()
          Get presentation names.
 java.lang.String getPresentationType()
          Get presentation type.
 java.lang.String[] getQualifiers()
          Get qualifiers.
 java.lang.String getType()
          Get type.
 int getVersion()
          Get version.
 int readTWGEventSourceDescriptor(IntelByteBuffer buf, int off)
          Method for interpreting a provided IntelByteBuffer at a given offset.
 int sizeOf()
          Determine the size of the entire object.
 int sizeOfTWGEventSourceDescriptor()
          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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TWGEventSourceDescriptor

public TWGEventSourceDescriptor()

TWGEventSourceDescriptor

public TWGEventSourceDescriptor(java.lang.String family,
                                java.lang.String[] qualifiers,
                                java.lang.String[] pnames,
                                java.util.Locale locale,
                                int version)
Constructor.

Parameters:
family - major category of event source
qualifiers - language nuetral array of strings describing event source
pnames - array of presentation strings mirroring qualifiers of event source
locale - locale of presentation strings
version - version associated with data defined in this object

TWGEventSourceDescriptor

public TWGEventSourceDescriptor(TWGEventSourceDescriptor esd)
Copy Constructor.

Parameters:
esd - event source descriptor to be copied

TWGEventSourceDescriptor

public TWGEventSourceDescriptor(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

TWGEventSourceDescriptor

public TWGEventSourceDescriptor(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

getType

public java.lang.String getType()
Get type.

Returns:
event source as a string (like an event type)

getPresentationType

public java.lang.String getPresentationType()
Get presentation type.

Returns:
event source as a string (like an event type)

getPresentationNames

public java.lang.String[] getPresentationNames()
Get presentation names.

Returns:
array of presentation names

getFlags

public int getFlags()
Get flags.

Returns:
flags as an integer

getVersion

public int getVersion()
Get version.

Returns:
integer of flags

getLocale

public java.util.Locale getLocale()
Get locale.

Returns:
Locale of presentation names

getDetails

public TWGEventSourceDetail[] getDetails()
Get details.

Returns:
array of TWGEventSourceDetail objects

addDetail

public void addDetail(TWGEventSourceDetail detail)
Add a detail.

Parameters:
detail - TWGEventSourcedetail object to be added

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

sizeOfTWGEventSourceDescriptor

public int sizeOfTWGEventSourceDescriptor()
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

readTWGEventSourceDescriptor

public int readTWGEventSourceDescriptor(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