com.pcbsys.nirvana.client.nProtobufEvent Class Reference

This class represents a Google Protocol Buffer Event. More...

Inheritance diagram for com.pcbsys.nirvana.client.nProtobufEvent:
com.pcbsys.nirvana.client.nConsumeEvent com.pcbsys.nirvana.base.nConsumeEvent

Public Member Functions

String getTypeName ()
 Returns the type name of the message in the nProtobufEvent as a String. More...
 
 nProtobufEvent (byte[] data, String descriptionName)
 Constructs a new nProtobufEvent with the message type set to the type name of the message passed in. More...
 
 nProtobufEvent (String tag, byte[] data, String descriptionName)
 Constructs a new nProtobufEvent with the message type set to the type name of the message passed in. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.client.nConsumeEvent
void ack () throws Exception
 Sends an ack for this event to the server. More...
 
nEventAttributes getAttributes ()
 Method that returns the nEventAttributes for this event. More...
 
String getChannelName ()
 This function will return the name of the channel / queue that the event was delivered from. More...
 
String getDataGroupName ()
 Get the name of the nDataGroup that this event was published to.
 
String getFullChannelName () throws nBaseClientException
 This function will return the fully qualified name of the channel / queue that the event was delivered from. More...
 
String getPublishHost ()
 Return the hostname from which the event was published. More...
 
String getPublishUser ()
 Return the id of the user that published this event. More...
 
long getTimestamp ()
 Return the timestamp of this event. More...
 
boolean hasAttributes ()
 Method indicating whether there is an nEventAttributes associated with this event. More...
 
 nConsumeEvent (byte[] tag, byte[] data)
 Constructs a new nConsumeEvent with the specified event tag and data. More...
 
 nConsumeEvent (String tag, byte[] data)
 Constructs a new nConsumeEvent with the specified event tag and data. More...
 
 nConsumeEvent (String tag, byte[] data, boolean dom)
 Constructs a new nConsumeEvent with the specified event tag and data. More...
 
 nConsumeEvent (nEventProperties properties, byte[] data)
 Constructs a new nConsumeEvent with the specified event properties and data. More...
 
 nConsumeEvent (String tag, nEventProperties properties, byte[] data)
 Constructs a new nConsumeEvent with the specified event properties and data. More...
 
 nConsumeEvent (String tag, Document adom)
 Constructs a new nConsumeEvent with the specified event tag and XML data. More...
 
 nConsumeEvent (nEventProperties properties, Document adom)
 Constructs a new nConsumeEvent with the specified event tag and XML data. More...
 
void rollback () throws Exception
 Tells the server that it does not ack this event. More...
 
void setAttributes (nEventAttributes attributes)
 Method that sets the nEventAttributes for this event. More...
 
void setSubscriberHost (byte[] host)
 Sets the host name or ip address representing the consumers of this event. More...
 
void setSubscriberName (byte[] subName)
 Sets the session name that will be the only consumer of this event. More...
 
void setSubscriberName (String subName) throws Exception
 Sets the session name that will be the only consumer of this event. More...
 
void setSubscriberNames (String[] subName) throws nIllegalArgumentException
 Sets the session names that will be the only consumers of this event. More...
 
byte[] sign (nMessageSigner signer) throws Exception
 This function will return a byte[] representing a signature of the nConsumeEvent. More...
 
synchronized Object validate (nMessageValidator validator) throws Exception
 This function will validate this nConsumeEvent object with the validator. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.base.nConsumeEvent
void ack (boolean isSynchronous, boolean ackPrevious) throws Exception
 Sends an acknowledgment request for this nConsumeEvent. More...
 
void ack (boolean isSynchronous) throws Exception
 Sends an ack for this event to the server, we will ack all previous events. More...
 
void ack (long timeout, boolean isSynchronous, boolean ackPrevious) throws Exception
 Sends an ack for this event to the server, if a timeout value is passed, the ack will be retried if there is a failure. More...
 
void ack (long timeout) throws Exception
 Sends an ack for this event to the server, if a timeout value is passed, the ack will be retried if there is a failure. More...
 
Document getDocument ()
 Gets the XML DOM Document associated with this event, if set. More...
 
byte[] getEventData ()
 Gets the event data set for this event. More...
 
long getEventID ()
 Gets the unique (for its channel) event id value. More...
 
String getEventTag ()
 Gets the event tag set for this event. More...
 
nEventProperties getProperties ()
 Gets this event's properties. More...
 
byte[] getSignature ()
 Returns the digital signature of the event if it was signed by the publisher else it returns null. More...
 
long getTTL ()
 Returns how long the event will be stored on disk in a mixed channel. More...
 
boolean isDom ()
 Gets the isDom flag to find out if the event is marked as XML DOM. More...
 
boolean isEndOfChannel ()
 When you subscribe to a channel, and the channel's data contains a finite and reasonably static set of events, the last event in the channel is sent and marked as the end of the channel. More...
 
boolean isPersistant ()
 Returns the perisitant flag. More...
 
 nConsumeEvent (byte[] tag, byte[] data)
 Constructs a new nConsumeEvent with the specified event tag and data. More...
 
 nConsumeEvent (String tag, byte[] data)
 Constructs a new nConsumeEvent with the specified event tag and data. More...
 
 nConsumeEvent (String tag, byte[] data, boolean dom)
 Constructs a new nConsumeEvent with the specified event tag and data. More...
 
 nConsumeEvent (String tag, nEventProperties properties, byte[] data)
 Constructs a new nConsumeEvent with the specified event properties and data. More...
 
 nConsumeEvent (String tag, Document adom)
 Constructs a new nConsumeEvent with the specified event tag and XML data. More...
 
 nConsumeEvent (nEventProperties properties, Document adom)
 Constructs a new nConsumeEvent with the specified event tag and XML data. More...
 
void rollback (boolean isSynchronous) throws Exception
 Requests the server to roll back this nConsumeEvent. More...
 
void rollback (boolean isSynchronous, boolean individualRollback) throws Exception
 Requests the server to roll back this nConsumeEvent. More...
 
void rollback (long timeout, boolean isSynchronous, boolean individualRollback) throws Exception
 Tells the server that it does not ack this event, if a timeout value is passed, the rollback will be retried if there is a failure. More...
 
void setEventID (long newID)
 Sets the event id value of this event. More...
 
void setPersistant (boolean flag)
 Sets the persistant flag. More...
 
void setProperties (nEventProperties newProperties)
 Sets this event's properties. More...
 
void setTTL (long ttl)
 Sets the TTL for this event. More...
 

Protected Member Functions

 nProtobufEvent (byte[] data, byte[] descriptionName)
 Constructs a new nProtobufEvent with the message type set to the type name of the message passed in. More...
 
 nProtobufEvent (byte[] tag, byte[] data, byte[] descriptionName)
 Constructs a new nProtobufEvent with the message type set to the type name of the message passed in. More...
 
- Protected Member Functions inherited from com.pcbsys.nirvana.base.nConsumeEvent
void encodeDOM (xmlHelper helper)
 Encode the Dom in this conduit event to byte[]. More...
 

Detailed Description

This class represents a Google Protocol Buffer Event.

A Google Protocol Buffer Event consists of the serialized Message and a string to identify what type of message is contained. The MessageType attribute in the event header is set to 6 to identify the message as a Protocol buffer event. Optionally a Google Protocol Buffer Event may also contain a tag.

Constructor & Destructor Documentation

com.pcbsys.nirvana.client.nProtobufEvent.nProtobufEvent ( byte[]  data,
byte[]  descriptionName 
)
protected

Constructs a new nProtobufEvent with the message type set to the type name of the message passed in.

Parameters
datathe serialized message as a byte[]
descriptionNamethe google protocol buffer Descriptor type name as a byte[]
com.pcbsys.nirvana.client.nProtobufEvent.nProtobufEvent ( byte[]  tag,
byte[]  data,
byte[]  descriptionName 
)
protected

Constructs a new nProtobufEvent with the message type set to the type name of the message passed in.

Parameters
tagthe event tag as a byte[]
datathe serialized message as a byte[]
descriptionNamethe google protocol buffer Descriptor type name as a byte[]
com.pcbsys.nirvana.client.nProtobufEvent.nProtobufEvent ( byte[]  data,
String  descriptionName 
)

Constructs a new nProtobufEvent with the message type set to the type name of the message passed in.

Parameters
datathe serialized message as a byte[]
descriptionNamethe google protocol buffer Descriptor type name as a String
com.pcbsys.nirvana.client.nProtobufEvent.nProtobufEvent ( String  tag,
byte[]  data,
String  descriptionName 
)

Constructs a new nProtobufEvent with the message type set to the type name of the message passed in.

Parameters
tagthe event tag as a String
datathe serialized message as a byte[]
descriptionNamethe google protocol buffer Descriptor type name as a String

Member Function Documentation

String com.pcbsys.nirvana.client.nProtobufEvent.getTypeName ( )

Returns the type name of the message in the nProtobufEvent as a String.

Returns
the type name of the event's Message as a String