- com
- pcbsys
- nirvana
- client
- nProtobufEvent
This class represents a Google Protocol Buffer Event. More...
#include <nProtobufEvent.h>
Public Member Functions | |
std::string | getTypeName () |
Returns the type name of the message in the nProtobufEvent as a String. More... | |
bool | isProtoBuffEvent () |
Method to identify whether this event has been constructed with a Google Protocol Buffer message. More... | |
nProtobufEvent (unsigned char *data, int dataLength, unsigned char *descriptionName, int descriptionLength) | |
Constructs a new nProtobufEvent with the message type set to the type name of the message passed in. More... | |
nProtobufEvent (unsigned char *tag, int tagLength, unsigned char *data, int dataLength, unsigned char *descriptionName, int descriptionLength) | |
Constructs a new nProtobufEvent with the message type set to the type name of the message passed in. More... | |
![]() | |
void | ack () |
Sends an ack for this event to the server. More... | |
nEventAttributes * | getAttributes () |
Method that returns the nEventAttributes for this event. More... | |
std::string | getChannelName () |
This function will return the name of the channel / queue that the event was delivered from. More... | |
const std::string & | getDataGroupName () |
Get the name of the nDataGroup that this event was published to Returns the name. More... | |
unsigned char * | getEventData () |
Gets the event data set for this event. More... | |
longlong | getEventID () |
Gets the unique (for its channel) event id value. More... | |
std::string & | getEventTag () |
Gets the event tag set for this event. More... | |
std::string | getFullChannelName () |
This function will return the fully qualified name of the channel / queue that the event was delivered from. More... | |
nHeader * | getHeader () |
Get the event header Returns a pointer to the event header. More... | |
nEventProperties * | getProperties () |
Gets this event's properties. More... | |
void | getPublishHost (std::string &pubHost) |
Return the host name from which the event was published. More... | |
void | getPublishUser (std::string &pubUser) |
Return the id of the user that published this event. More... | |
unsigned char * | getSignature () |
Returns the digital signature of the event if it was signed by the publisher else it returns null. More... | |
longlong | getTimestamp () |
Return the time stamp of this event. More... | |
longlong | getTTL () |
Returns how long the event will be stored on disk in a mixed channel. More... | |
bool | hasAttributes () |
Method indicating whether there is an nEventAttributes associated with this event. More... | |
bool | 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... | |
bool | isPersistent () |
Returns the persistent flag. More... | |
bool | isTransient () |
Returns whether the event is transient. More... | |
nConsumeEvent (nEventProperties *pProperties, unsigned char *data, int dataLength) | |
Constructs a new nConsumeEvent with the specified event properties and data. More... | |
nConsumeEvent (const std::string &tag, nEventProperties *pProperties, unsigned char *data, int dataLength) | |
Constructs a new nConsumeEvent with the specified tag, event properties and data. More... | |
nConsumeEvent (unsigned char *tag, int tagLength, nEventProperties *pProperties, unsigned char *data, int dataLength) | |
Constructs a new nConsumeEvent with the specified tag, event properties and data. More... | |
nConsumeEvent (unsigned char *tag, int tagLength, unsigned char *data, int dataLength) | |
Constructs a new nConsumeEvent with the specified event tag and data. More... | |
nConsumeEvent (const std::string &tag, unsigned char *data, int dataLength) | |
Constructs a new nConsumeEvent with the specified event tag and data. More... | |
nConsumeEvent (nEventProperties *pProperties, std::string &tag) | |
Constructs a new nConsumeEvent with the specified event properties and tag. More... | |
void | rollback () |
Tells the server that it does not ack this event. More... | |
void | setAttributes (nEventAttributes *pAttributes) |
Method that sets the nEventAttributes for this event. More... | |
void | setPersistent (bool flag) |
Sets the persistent flag. More... | |
void | setProperties (nEventProperties *newProperties) |
Sets this event's properties. More... | |
void | setSubscriberHost (unsigned char *host, int length) |
Sets the host name or ip address representing the consumers of this event. More... | |
void | setSubscriberName (unsigned char *subName, int length) |
Sets the session name that will be the only consumer of this event. More... | |
void | setSubscriberNames (std::string *subName, int length) |
Sets the session names that will be the only consumers of this event. More... | |
void | setTransient (bool flag) |
Sets whether the event is transient. More... | |
void | setTTL (longlong ttl) |
Sets the TTL for this event. More... | |
Additional Inherited Members | |
![]() | |
void | setQueueReaderId (longlong queueReaderId) |
Sets the ID of the queue reader this event is received with. More... | |
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.
com::pcbsys::nirvana::client::nProtobufEvent::nProtobufEvent | ( | unsigned char * | data, |
int | dataLength, | ||
unsigned char * | descriptionName, | ||
int | descriptionLength | ||
) |
Constructs a new nProtobufEvent with the message type set to the type name of the message passed in.
data | the constructed message. |
descriptionName | the google protocol buffer Description type name |
com::pcbsys::nirvana::client::nProtobufEvent::nProtobufEvent | ( | unsigned char * | tag, |
int | tagLength, | ||
unsigned char * | data, | ||
int | dataLength, | ||
unsigned char * | descriptionName, | ||
int | descriptionLength | ||
) |
Constructs a new nProtobufEvent with the message type set to the type name of the message passed in.
tag | the event tag String encoded |
data | the constructed message. |
descriptionName | the google protocol buffer Description type name |
std::string com::pcbsys::nirvana::client::nProtobufEvent::getTypeName | ( | ) |
Returns the type name of the message in the nProtobufEvent as a String.
|
virtual |
Method to identify whether this event has been constructed with a Google Protocol Buffer message.
Will return true or false
Reimplemented from com::pcbsys::nirvana::client::nConsumeEvent.