com.tivoli.twg.alertmgr
Class TWGUnpublish

java.lang.Object
  extended bycom.tivoli.twg.alertmgr.TWGUnpublish
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
TWGUnpublishEventType

public class TWGUnpublish
extends java.lang.Object
implements java.lang.Cloneable

TWGUnpublish is the base class for all unpublishing api's. This abstract base class is used as a container for those things that are common to all unpublish records. The family and qualifier strings are combined to create the event type. Version allows the publish database (in the event server) to be overwritten/updated.


Field Summary
static int VERSION_ONE
           
 
Constructor Summary
TWGUnpublish(IntelByteBuffer buf)
          Constructor for interpreting a provided IntelByteBuffer.
TWGUnpublish(IntelByteBuffer buf, int off)
          Constructor for interpreting a provided IntelByteBuffer at a given offset.
TWGUnpublish(java.lang.String family, java.lang.String[] qualifiers)
          Constructor with default version.
TWGUnpublish(java.lang.String family, java.lang.String[] qualifiers, int version)
          Constructor.
TWGUnpublish(TWGUnpublish unpub)
          Copy Constructor.
 
Method Summary
 java.lang.Object clone()
          Copy object.
 int getNumTypeQualifiers()
          Get the number of qualifiers in the event type (not including family).
 java.lang.String getType()
          Get the event type to which this publication in defined.
 java.lang.String getTypeFamily()
          Get the highest level qualifier of the event type.
 int getTypeId()
          Get type ID.
 java.lang.String[] getTypeQualifiers()
          Get the array of event type qualifiers.
 int getVersion()
          Get the version of the data being unpublished.
 void print()
          Print the contents of the TWGUnpublish object.
 int readTWGUnpublish(IntelByteBuffer buf, int off)
          Method for interpreting a provided IntelByteBuffer at a given offset.
 void setVersion(int version)
          Set the version of the data being unpublished.
 int sizeOf()
          Determine the size of the entire TWGUnpublish object.
static int sizeOfHdr()
          Determine the size of the TWGUnpublish header.
 int sizeOfTWGUnpublish()
          Determine the size of the entire TWGUnpublish object.
 IntelByteBuffer toIntelByteBuffer()
          Convert the object into IntelByteBuffer representation.
 int writeIntelByteBuffer(IntelByteBuffer buf)
          Write contents of this object into an IntelByteBuffer.
 int writeIntelByteBuffer(IntelByteBuffer buf, int off)
          Write contents of this object into provided IntelByteBuffer starting at a given offset.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_ONE

public static final int VERSION_ONE
See Also:
Constant Field Values
Constructor Detail

TWGUnpublish

public TWGUnpublish(java.lang.String family,
                    java.lang.String[] qualifiers,
                    int version)
Constructor.

Parameters:
family - String representing the highest level qualifier of the event type
qualifiers - Array of strings comprising the remainder of the event type
version - Version of data being unpublished

TWGUnpublish

public TWGUnpublish(java.lang.String family,
                    java.lang.String[] qualifiers)
Constructor with default version.

Parameters:
family - String representing the highest level qualifier of the event type
qualifiers - Array of strings comprising the remainder of the event type

TWGUnpublish

public TWGUnpublish(TWGUnpublish unpub)
Copy Constructor.

Parameters:
unpub - TWGUnpublish object to be copied

TWGUnpublish

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

TWGUnpublish

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

clone

public java.lang.Object clone()
Copy object.

Returns:
copy of the TWGUnpublish object

getType

public java.lang.String getType()
Get the event type to which this publication in defined.

Returns:
programmatic event type

getNumTypeQualifiers

public int getNumTypeQualifiers()
Get the number of qualifiers in the event type (not including family).

Returns:
number of type qualifiers in the event type (not including family)

getTypeQualifiers

public java.lang.String[] getTypeQualifiers()
Get the array of event type qualifiers.

Returns:
array of type qualifiers

setVersion

public void setVersion(int version)
Set the version of the data being unpublished.

Parameters:
version - version of data being unpublished

getVersion

public int getVersion()
Get the version of the data being unpublished.

Returns:
version of data being unpublished

getTypeFamily

public java.lang.String getTypeFamily()
Get the highest level qualifier of the event type.

Returns:
string representing the source of the event

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 contents of this 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

readTWGUnpublish

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

sizeOfHdr

public static int sizeOfHdr()
Determine the size of the TWGUnpublish header.

Returns:
number of bytes that comprise the header

sizeOfTWGUnpublish

public int sizeOfTWGUnpublish()
Determine the size of the entire TWGUnpublish object.

Returns:
number of bytes that comprise the object

sizeOf

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

Returns:
number of bytes that comprise the object

print

public void print()
Print the contents of the TWGUnpublish object.


getTypeId

public int getTypeId()
Get type ID. Used by engine to match publish and unpublish.

Returns:
an ID.