com::pcbsys::nirvana::client::nSession Class Reference

This class represents a Nirvana session, the logical connection between the client API and the Nirvana realm. More...

#include <nSession.h>

Inherits NotifyableCountableObject.

Public Member Functions

void addAsyncExceptionListener (nAsyncExceptionListener *pListener)
 Adds a new asynchronous exception listener, which will be notified when an exception occurs while performing an asynchronous operation. More...
 
void addConnectionQueueListener (nConnectionQueueListener *pListener)
 Adds a new connection queue listener, which will be notified when the internal outbound queue reaches defined limits. More...
 
void addConnectionQueueListener (nConnectionQueueListener *pListener, bool hwm, bool lwm, bool access, bool push, bool block, bool unblock)
 Adds a new connection queue listener, which will be notified when the internal outbound queue reaches defined limits, such as. More...
 
void addRealm (nRealm *pNewRealm, nSession *pSession=NULL)
 Adds (Joins) another realm to the realm this session is connected to. More...
 
void addReconnectHandler (nReconnectHandler *pHandler)
 Add a session reconnect handler to the session. More...
 
void close ()
 Closes this session, disconnecting from the server and killing all threads.
 
void commitRegisteredEventsToDataGroups (std::list< nRegisteredEvent * > &events, bool replace=false)
 Commit all registered event changes in a single call to the server. More...
 
nCreateResult ** create (nChannelAttributes **attr, int numAttr, int &numResults)
 Creates new channels on the realm this session is connected. More...
 
nChannelcreateChannel (nChannelAttributes *pAttr, ulonglong p_initialEID=0)
 Creates a new channel on the realm this session is connected. More...
 
nChannelcreateChannel (nChannelAttributes *pAttr, ulonglong initialEID, long privMask)
 Creates a new channel on the realm this session is connected. More...
 
virtual nDataGroupcreateDataGroup (const std::string &dataGroupName, nDataGroupListener *pListener=NULL, nConflationAttributes *pConflationAttributes=NULL, bool enableMulticast=false, unsigned int priorityLevel=fPrioritized::sDefaultPriority)
 Create a new data group on the server. More...
 
virtual nDataGroupcreateDataGroup (const std::string &dataGroupName, bool enableMulticast)
 Create a new data group on the server. More...
 
virtual std::list< nDataGroup * > * createDataGroups (std::string *pDataGroupNames, int numGroup, nConflationAttributes *pConflationAttributes=NULL)
 Create new data groups on the server if they don't exist, or return them from the local list if found. More...
 
nQueuecreateQueue (nChannelAttributes *pAttr, long privMask=-1)
 Creates a new queue on the realm this session is connected. More...
 
void deleteChannel (nChannelAttributes *pAttr)
 Deletes a nirvana channel that exists on the realm this session is connected to, or a joined realm. More...
 
void deleteDataGroup (std::string *pDataGroupNames, int numGroup)
 Deletes the specified data group from the server. More...
 
virtual void deleteDataGroup (const std::string &dataGroupName)
 Deletes the specified data group from the server. More...
 
virtual void deleteDataGroup (nDataGroup *pGroup)
 Deletes the specified data group from the server. More...
 
void deleteDataGroup (nDataGroup **pGroups, int numGroup)
 Deletes the specified data group from the server. More...
 
void deleteQueue (nChannelAttributes *pAttr)
 Deletes a nirvana queue that exists on the realm this session is connected to, or a joined realm. More...
 
void deleteRealm (nRealm *pRealm)
 Deletes (unjoins) another realm from the realm this session is connected to. More...
 
virtual fSortedList
< std::string, nFindResult * > * 
find (nChannelAttributes **ppAttr, int nAttr)
 Finds and returns an array of nFindResult objects that correspond to the results of the find operations on each nChannelAttributes. More...
 
nChannelfindChannel (nChannelAttributes *pAttr, bool useCache=true)
 Finds and returns a nirvana channel that exists on the realm this session is connected to, or a joined realm. More...
 
nQueuefindQueue (nChannelAttributes *pAttr)
 Finds and returns a nirvana queue that exists on the realm this session is connected to, or a joined realm. More...
 
nSessionAttributesgetAttributes ()
 Gets the session attribute object associated with this session. More...
 
nChannelAttributes ** getChannels (int &nAttr, const std::string folder="")
 Returns a list of all known channels and queues. More...
 
long getClientKeepAlive ()
 Retrieve the current keep alive interval of a particular session. More...
 
std::string getConnectionList ()
 Returns a comma separated list of RNAMEs which can be used to access the realm or cluster namespace. More...
 
long getCurrentLatency ()
 Returns the round trip time of the last synchronous request that was made. More...
 
virtual std::list< nDataGroup * > * getDataGroups (nDataGroupListener *pListener)
 Get all known data groups on the server (excluding the default data group) and register a listener. More...
 
virtual std::list< nDataGroup * > * getDataGroups (std::string prefix="", nDataGroupListener *pListener=NULL)
 Get all known data groups on the server that have the given prefix (excluding the default data group) and register a listener. More...
 
virtual nDataGroupgetDefaultDataGroup (nDataGroupListener *pListener=NULL)
 Return the default nDataGroup object, and provide a listener that will receive callbacks when new streams are added or removed. More...
 
std::string getId ()
 Returns the unique session Id for this session. More...
 
ulonglong getInputByteCount ()
 Returns the number of bytes received from the server on this session object. More...
 
int getKnownGroupCount ()
 Get the size of the known data groups list. More...
 
ulonglong getOutputByteCount ()
 Returns the number of bytes sent to the server using this session object. More...
 
ulonglong getQueueSize ()
 Returns the outbound connection queue size. More...
 
nRealmgetRealm (const std::string &name)
 Gets a reference to a realm that is already joined. More...
 
nRealm ** getRealms (int &numRealm)
 Returns a list of all known realms on the connected realm. More...
 
ulonglong getReceivedEventCount ()
 Return the number of events received by this session. More...
 
std::string getRemoteId ()
 Returns the rname that this session has used. More...
 
ulonglong getSentEventCount ()
 Return the number of events sent by this session. More...
 
std::string getServerRealmName ()
 Returns the sessions server realm name. More...
 
ulonglong getServerTime ()
 Gets the current time on the server. More...
 
ulonglong getSessionConnectionId ()
 Returns the unique connection id associated with this session by the server. More...
 
virtual const std::string & getStreamId ()
 Get the stream Id for this session if initialised with an nDataStreamListener. More...
 
nSubject ** getSubject (int &numSubject)
 Gets the subject associated with this nirvana session. More...
 
nSubjectgetSubjectObject ()
 Gets the subject associated with this nirvana session. More...
 
void init ()
 Initialises a session object, opening the physical connection to the server. More...
 
void init (bool disconnectIfClusterFails)
 Initialises a session object, opening the physical connection to the server. More...
 
nDataStreaminit (nDataStreamListener *pStreamListener)
 Initialises a session object, opening the physical connection to the server and supplies a nDataStreamListener to receive asynchronous direct events. More...
 
nDataStreaminit (bool fails, nDataStreamListener *pStreamListener)
 Initialises a session object, opening the physical connection to the server and supplies a nDataStreamListener to receive asynchronous direct events. More...
 
bool isConnected ()
 Returns true if this session is still connected with the remote realm. More...
 
bool isMemberOfCluster ()
 If the realm this session is connected to is part of a cluster then this function will return true. More...
 
bool isPaused ()
 Returns true if this session is paused. More...
 
void pause (bool release)
 This function pauses delivery of new events to all subscribed nEventListeners until resume is called. More...
 
virtual void pauseStream ()
 Pause the events being received by the Data Group Listener. More...
 
bool pingServer (long timeoutMS, bool autoClose=false)
 Sends an event to the server, to see if the server is still responding to requests. More...
 
nDeleteResult ** remove (nChannelAttributes **attr, int numAttr, int &numResults)
 Deletes all channels in the array of nChannelAttributes array. More...
 
void removeAsyncExceptionListener (nAsyncExceptionListener *pListener)
 Removes an already added asynchronous exception listener, which will not be notified of asynchronous exceptions anymore. More...
 
void removeConnectionQueueListener (nConnectionQueueListener *pListener)
 Removes an already added connection queue listener, which will not be notified of queue state changes anymore. More...
 
void removeReconnectHandler (nReconnectHandler *pHandler)
 Remove the reconnect handler from the session. More...
 
void resume ()
 Resumes delivery of events to nEventListeners.
 
virtual void resumeStream ()
 Resumes the events being received by the Data Group Listener. More...
 
void setClientKeepAlive (long time)
 Dynamically reset the client keep alive interval of a particular session. More...
 
void setThreadPoolSize (int size)
 Set size of thread pool. More...
 
virtual nSubscriptionAttributes ** subscribe (nSubscriptionAttributes **ppAttributes, int nAttribute)
 Subscribe to the channels specified within the nSubscriptionAttributes array. More...
 
void unblockThread (const std::string &name)
 Unblocks the thread of the given name that my be in a synchronous call. More...
 
void updateConnectionListWithServerList ()
 Update the current session attributes with the RNAMEs retrieved from the server.
 
virtual void write (nConsumeEvent **evts, int nevents, nAbstractChannel *destination)
 Sends the events to the specified channel / queue. More...
 
virtual void write (nConsumeEvent **evts, int nevents, nAbstractChannel **destinations, int ndestinations)
 Sends the events to the specified channels / queues. More...
 
virtual void write (nConsumeEvent **evts, int nevents, nAbstractChannel **destinations, int ndestinations, bool waitForReply)
 Sends the events to the specified channels / queues. More...
 
virtual void write (nConsumeEvent *evts, nAbstractChannel **destinations, int ndestinations, bool waitForReply)
 Sends the event to the specified channels / queues. More...
 
virtual void write (nConsumeEvent **evts, int nevents, nAbstractChannel *destination, bool waitForReply)
 Sends the events to the specified channels / queues. More...
 
virtual void write (nConsumeEvent *evt, nAbstractChannel *destination, bool waitForReply)
 Sends the event to the specified channel / queue. More...
 
virtual void write (std::map< nConsumeEvent *, nAbstractChannel * > *list, bool waitForResponse)
 Sends each event in the list to its corresponding channel / queue. More...
 
virtual void writeDataGroup (nConsumeEvent *pEvt, nDataGroup *pDataGroup, bool waitForResponse=false, bool registered=false)
 Sends the event to the specified data group. More...
 
virtual void writeDataGroup (nConsumeEvent *pEvt, nDataGroup **ppDataGroups, int numGroup, bool waitForResponse=false)
 Sends the event to all of the specified data groups. More...
 
virtual void writeDataGroup (nConsumeEvent **ppEvts, int numEvent, nDataGroup *pDataGroup, bool waitForResponse=false)
 Sends the list of events to the specified data group. More...
 
virtual void writeDataGroup (nConsumeEvent **ppEvts, int numEvent, nDataGroup **ppDataGroups, int numGroup, bool waitForResponse=false)
 Sends the events to the specified streams. More...
 
virtual void writeDataGroup (std::map< nConsumeEvent *, nDataGroup * > &list, bool waitForResponse=false, bool registered=false)
 Sends each event in the list to its corresponding data group. More...
 
virtual void writeDataStream (nConsumeEvent *pEvt, nDataStream *pStream, bool waitForResponse=false)
 Sends the event to the specified stream. More...
 
virtual void writeDataStream (nConsumeEvent *pEvt, nDataStream **ppStreams, int numStream, bool waitForResponse=false)
 Sends the event to the specified streams. More...
 
virtual void writeDataStream (nConsumeEvent **ppEvts, int numEvent, nDataStream *pStream, bool waitForResponse=false)
 Sends the events to the specified stream. More...
 
virtual void writeDataStream (nConsumeEvent **ppEvts, int numEvent, nDataStream **ppStreams, int numStream, bool waitForResponse=false)
 Sends the events to the specified streams. More...
 
void writeDataStream (std::map< nConsumeEvent *, nDataStream * > *list, bool waitForResponse=false, bool isRegisteredEvent=false)
 Sends each event in the list to its corresponding data stream. More...
 

Static Public Member Functions

static long getMaxBufferSize ()
 Gets the maximum client buffer size. More...
 
static void setMaxBufferSize (long size)
 Sets the maximum client buffer size. More...
 

Detailed Description

This class represents a Nirvana session, the logical connection between the client API and the Nirvana realm.

A Nirvana session is defined through a set of session attributes that is represented by the nSessionAttributes class in the same package. This set of attributes is then passed to the session factory object which creates the session. A session object needs to be initialised in order for the physical connection to be opened to the server. Please note that when using a session to retrieve events from a channel or queue, you can only have 1 listener specifying a set filter per session object. For example if you have a selector set as CCY='USD' you can use that filter by only one object implementing the nEventListener interface per session, otherwise a nUserAlreadySubscribedException will be thrown.

Member Function Documentation

void com::pcbsys::nirvana::client::nSession::addAsyncExceptionListener ( nAsyncExceptionListener pListener)

Adds a new asynchronous exception listener, which will be notified when an exception occurs while performing an asynchronous operation.

Parameters
*pListenerThe asynchronous exception listener to be added
Exceptions
nIllegalArgumentExceptionIllegal parameter, check the message for more information
void com::pcbsys::nirvana::client::nSession::addConnectionQueueListener ( nConnectionQueueListener pListener)

Adds a new connection queue listener, which will be notified when the internal outbound queue reaches defined limits.

Such as

Reaching high water mark Reaching low water mark Exceeding the time it should take to access the queue object Exceeding the time it should take to push an event onto the queue Exceeding the time for a queue to be blocked due to reaching its high water mark

Parameters
*pListenerThe asynchronous exception listener to be added
Exceptions
nIllegalArgumentExceptionif the listener is Null of if already has a listener registered
void com::pcbsys::nirvana::client::nSession::addConnectionQueueListener ( nConnectionQueueListener pListener,
bool  hwm,
bool  lwm,
bool  access,
bool  push,
bool  block,
bool  unblock 
)

Adds a new connection queue listener, which will be notified when the internal outbound queue reaches defined limits, such as.

Reaching high water mark Reaching low water mark Exceeding the time it should take to access the queue object Exceeding the time it should take to push an event onto the queue Exceeding the time for a queue to be blocked due to reaching its high water mark

Parameters
*pListenerThe asynchronous exception listener to be added
hwmtrue to receive notifications of reaching queue high water mark
lwmtrue to receive notifications of reaching queue low water mark
accesstrue to receive notification of exceeding queue access time
pushtrue to receive notification of exceeding queue access and push time
blocktrue to receive notification of exceeding queue block time
unblocktrue to receive notification of exceeding queue unblock time
Exceptions
nIllegalArgumentExceptionif the listener is Null of if already has a listener registered
void com::pcbsys::nirvana::client::nSession::addRealm ( nRealm pNewRealm,
nSession pSession = NULL 
)

Adds (Joins) another realm to the realm this session is connected to.

Parameters
*pNewRealmThe realm to join as an nRealm object
*pSessionA session to the realm we want to add to
Exceptions
nRealmAlreadyBoundExceptionThe realm is known by the server
nRealmUnreachableExceptionThe specified realm is already configured
nRealmNotFoundExceptionThe realm is not known by the server
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nNameSpaceConflictExceptionThe realm conflicts with the existing namespace
nSessionPausedExceptionThe session is currently paused, please resume
void com::pcbsys::nirvana::client::nSession::addReconnectHandler ( nReconnectHandler pHandler)

Add a session reconnect handler to the session.

Usually the handler is passed in when the session is constructed from the nSessionFactory, however this method allows you to pass in a handler once a session has been constructed.

Parameters
*pHandler- the nReconnectHandler object for this session
void com::pcbsys::nirvana::client::nSession::commitRegisteredEventsToDataGroups ( std::list< nRegisteredEvent * > &  events,
bool  replace = false 
)

Commit all registered event changes in a single call to the server.

Parameters
eventsthe registered events that have changed
replaceoverride the events on the server
Exceptions
nSecurityException
nSessionPausedException
nIllegalArgumentException
nSessionNotConnectedException
nRequestTimedOutException
nUnexpectedResponseException
nCreateResult** com::pcbsys::nirvana::client::nSession::create ( nChannelAttributes **  attr,
int  numAttr,
int &  numResults 
)

Creates new channels on the realm this session is connected.

Parameters
attrThe channel attributes array containing the new channel or queue attributes
numAttrThe length of the attr array
numResultsThe length of the array that is returned
Returns
an nCreateResult array representing the newly created nirvana channels or queues or exceptions
Exceptions
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nChannelAlreadyExistsExceptionThe channel already exists
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occured, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
nChannel* com::pcbsys::nirvana::client::nSession::createChannel ( nChannelAttributes pAttr,
ulonglong  p_initialEID = 0 
)

Creates a new channel on the realm this session is connected.

If the channel attributes specify a realm different than the one this session is connected to, a transparent redirection will occur and the channel will be created on that realm.

Parameters
*pAttrThe channel attributes object containing the parameters for the new channel to be created
p_initialEIDThe value to start the event id at
Returns
an nChannel object representing the newly created nirvana channel
Exceptions
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nChannelAlreadyExistsExceptionThe channel already exists
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
nChannel* com::pcbsys::nirvana::client::nSession::createChannel ( nChannelAttributes pAttr,
ulonglong  initialEID,
long  privMask 
)

Creates a new channel on the realm this session is connected.

If the channel attributes specify a realm different than the one this session is connected to, a transparent redirection will occur and the channel will be created on that realm.

Parameters
*pAttrThe channel attributes object containing the parameters for the new channel to be created
initialEIDThe value to start the event id at
privMaskPrivilege mask to apply to the "everyone" subject for this channel
Returns
an nChannel object representing the newly created nirvana channel
Exceptions
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nChannelAlreadyExistsExceptionThe channel already exists
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
virtual nDataGroup* com::pcbsys::nirvana::client::nSession::createDataGroup ( const std::string &  dataGroupName,
nDataGroupListener pListener = NULL,
nConflationAttributes pConflationAttributes = NULL,
bool  enableMulticast = false,
unsigned int  priorityLevel = fPrioritized::sDefaultPriority 
)
virtual

Create a new data group on the server.

If the data group exists already, and the groups have already been retrieved by this nSession the nDataGroup will be returned from the local list of data groups. Otherwise this method will send an event to the server.

Parameters
dataGroupNamethe name of the data group to create
pListenerthe instance of the nDataGroupListener that will receive the callbacks for this group. Default = NULL
pConflationAttributesthe conflation strategy to use on the data group. Default = NULL
Returns
the data group matching the specified name
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nUnexpectedResponseException
nIllegalArgumentException
See Also
nConflationAttributes
Since
6.0
virtual nDataGroup* com::pcbsys::nirvana::client::nSession::createDataGroup ( const std::string &  dataGroupName,
bool  enableMulticast 
)
virtual

Create a new data group on the server.

If the data group exists already, and the groups have already been retrieved by this nSession the nDataGroup will be returned from the local list of data groups. Otherwise this method will send an event to the server.

Parameters
dataGroupNamethe name of the data group to create
enableMulticastshould this datagroup support multicast
Returns
the data group matching the specified name
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nUnexpectedResponseException
nIllegalArgumentException
See Also
nConflationAttributes
Since
6.1
virtual std::list<nDataGroup*>* com::pcbsys::nirvana::client::nSession::createDataGroups ( std::string *  pDataGroupNames,
int  numGroup,
nConflationAttributes pConflationAttributes = NULL 
)
virtual

Create new data groups on the server if they don't exist, or return them from the local list if found.

Parameters
pDataGroupNamesthe names of the data groups to create
numGroupthe number of group names in the array
pConflationAttributesthe conflation strategy to be applied to the data groups. Default = NULL
Returns
the array of data groups created / found
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nUnexpectedResponseException
nIllegalArgumentException
nQueue* com::pcbsys::nirvana::client::nSession::createQueue ( nChannelAttributes pAttr,
long  privMask = -1 
)

Creates a new queue on the realm this session is connected.

If the channel attributes specify a realm different than the one this session is connected to, a transparent redirection will occur and the queue will be created on that realm.

Parameters
*pAttrThe channel attributes object containing the parameters for the new queue to be created
privMaskPrivilege mask to apply to the "everyone" subject for this queue
Returns
an nQueue object representing the newly created nirvana queue
Exceptions
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nChannelAlreadyExistsExceptionThe channel already exists
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
void com::pcbsys::nirvana::client::nSession::deleteChannel ( nChannelAttributes pAttr)

Deletes a nirvana channel that exists on the realm this session is connected to, or a joined realm.

Note: all events in that channel will be deleted too and are not recoverable.

Parameters
*pAttrThe channel attributes of the channel to be deleted
Exceptions
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nChannelNotFoundExceptionThe specified channel could not be found
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
void com::pcbsys::nirvana::client::nSession::deleteDataGroup ( std::string *  pDataGroupNames,
int  numGroup 
)

Deletes the specified data group from the server.

Parameters
pDataGroupNamesarray of data group names to be deleted
numGroupsize of data group
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nIllegalArgumentException
nUnexpectedResponseException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::deleteDataGroup ( const std::string &  dataGroupName)
virtual

Deletes the specified data group from the server.

Parameters
dataGroupNamethe name of the data group to delete
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nIllegalArgumentException
nUnexpectedResponseException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::deleteDataGroup ( nDataGroup pGroup)
virtual

Deletes the specified data group from the server.

Parameters
pGroupthe data group to delete
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nUnexpectedResponseException
Since
6.0
void com::pcbsys::nirvana::client::nSession::deleteDataGroup ( nDataGroup **  pGroups,
int  numGroup 
)

Deletes the specified data group from the server.

Parameters
pGroupsthe data groups to delete
numGroupthe size of the data group
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nUnexpectedResponseException
Since
6.0
void com::pcbsys::nirvana::client::nSession::deleteQueue ( nChannelAttributes pAttr)

Deletes a nirvana queue that exists on the realm this session is connected to, or a joined realm.

Note: all events in that queue will be deleted too and are not recoverable.

Parameters
*pAttrThe channel attributes of the queue to be deleted
Exceptions
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nChannelNotFoundExceptionThe specified channel could not be found
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
void com::pcbsys::nirvana::client::nSession::deleteRealm ( nRealm pRealm)

Deletes (unjoins) another realm from the realm this session is connected to.

Parameters
*pRealmThe realm to unjoin as an nRealm object
Exceptions
nRealmNotFoundExceptionThe supplied realm could not be found on the server
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
virtual fSortedList<std::string, nFindResult*>* com::pcbsys::nirvana::client::nSession::find ( nChannelAttributes **  ppAttr,
int  nAttr 
)
virtual

Finds and returns an array of nFindResult objects that correspond to the results of the find operations on each nChannelAttributes.

Parameters
**ppAttrThe channel attributes of the channels / queues to be found
nAttrThe length of the returned ppAttr array
Returns
The nFindResult array that represents the result of the find call
Exceptions
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
nChannel* com::pcbsys::nirvana::client::nSession::findChannel ( nChannelAttributes pAttr,
bool  useCache = true 
)

Finds and returns a nirvana channel that exists on the realm this session is connected to, or a joined realm.

Parameters
*pAttrThe channel attributes of the channel to be found
Returns
The nChannel object if it was found.
Exceptions
nChannelNotFoundExceptionThe channel specified could not be found
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nIllegalChannelModeThe channel referenced is a queue
nSessionPausedExceptionThe session is currently paused, please resume
nQueue* com::pcbsys::nirvana::client::nSession::findQueue ( nChannelAttributes pAttr)

Finds and returns a nirvana queue that exists on the realm this session is connected to, or a joined realm.

Parameters
*pAttrThe channel attributes of the queue to be found
Returns
The nChannel object if it was found.
Exceptions
nChannelNotFoundExceptionThe specified queue could not be found
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nIllegalChannelModeThe queue referenced is a channel
nSessionPausedExceptionThe session is currently paused, please resume
nSessionAttributes* com::pcbsys::nirvana::client::nSession::getAttributes ( )

Gets the session attribute object associated with this session.

Returns
the nSessionAttributes object associated with this session
nChannelAttributes** com::pcbsys::nirvana::client::nSession::getChannels ( int &  nAttr,
const std::string  folder = "" 
)

Returns a list of all known channels and queues.

Parameters
nAttrthe length of the returned array
folderspecify the starting point in the namespace within which to retrieve the channels
Returns
An nChannelAttributes array object referring to the channels, or null if no channels are defined
Exceptions
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nSessionPausedExceptionThe session is currently paused, please resume
long com::pcbsys::nirvana::client::nSession::getClientKeepAlive ( )

Retrieve the current keep alive interval of a particular session.

Returns
a long indicating an actual time interval (in milliseconds).
std::string com::pcbsys::nirvana::client::nSession::getConnectionList ( )

Returns a comma separated list of RNAMEs which can be used to access the realm or cluster namespace.

This value is calculated and updated by the server which this session is currently connected to.

Returns
Comma separated list of rnames which can be used to construct a nSessionAttributes.
long com::pcbsys::nirvana::client::nSession::getCurrentLatency ( )

Returns the round trip time of the last synchronous request that was made.

Returns
the current round trip time
virtual std::list<nDataGroup*>* com::pcbsys::nirvana::client::nSession::getDataGroups ( nDataGroupListener pListener)
virtual

Get all known data groups on the server (excluding the default data group) and register a listener.

The listener will receive callbacks whenever a stream or group is created/deleted or added/removed from a group.

Parameters
pListenerthe instance of the nDataGroupListener that will receive callbacks for all known data groups including the default
Returns
the data group array
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nUnexpectedResponseException
virtual std::list<nDataGroup*>* com::pcbsys::nirvana::client::nSession::getDataGroups ( std::string  prefix = "",
nDataGroupListener pListener = NULL 
)
virtual

Get all known data groups on the server that have the given prefix (excluding the default data group) and register a listener.

The listener will receive callbacks whenever a stream or group is created/deleted or added/removed from a group.

Parameters
prefixwill only return datagroups that have names with this prefix
pListenerthe instance of the nDataGroupListener that will receive callbacks for all known data groups including the default
Returns
the data group array
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nUnexpectedResponseException
virtual nDataGroup* com::pcbsys::nirvana::client::nSession::getDefaultDataGroup ( nDataGroupListener pListener = NULL)
virtual

Return the default nDataGroup object, and provide a listener that will receive callbacks when new streams are added or removed.

Parameters
pListenerthe instance of the nDataGroupListener that will receive the callbacks to the default group
Returns
the default data group
Exceptions
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nSecurityException
nUnexpectedResponseException
std::string com::pcbsys::nirvana::client::nSession::getId ( )

Returns the unique session Id for this session.

Returns
String representation of this ID
Exceptions
nSessionNotConnectedExceptionCurrent session is not connected
ulonglong com::pcbsys::nirvana::client::nSession::getInputByteCount ( )

Returns the number of bytes received from the server on this session object.

Returns
longlong byte count
int com::pcbsys::nirvana::client::nSession::getKnownGroupCount ( )

Get the size of the known data groups list.

Returns
the current size of the data groups list
static long com::pcbsys::nirvana::client::nSession::getMaxBufferSize ( )
static

Gets the maximum client buffer size.

The default value is 1 MB

Returns
an int specifying the current maximum client buffer size
ulonglong com::pcbsys::nirvana::client::nSession::getOutputByteCount ( )

Returns the number of bytes sent to the server using this session object.

Returns
longlong byte count
ulonglong com::pcbsys::nirvana::client::nSession::getQueueSize ( )

Returns the outbound connection queue size.

Returns
the size of the queue
nRealm* com::pcbsys::nirvana::client::nSession::getRealm ( const std::string &  name)

Gets a reference to a realm that is already joined.

Parameters
nameA string specifying the name of the realm to be returned
Returns
An nRealm object referring to the realm, or null if no realm with that name is found
Exceptions
nRealmNotFoundExceptionThe realm name supplied could not be found on the server
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
nRealm** com::pcbsys::nirvana::client::nSession::getRealms ( int &  numRealm)

Returns a list of all known realms on the connected realm.

Returns
An nRealm array object referring to the realm, or null if no realms are defined
Exceptions
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nIllegalArgumentExceptionIllegal parameter, check the message for more information
nSessionPausedExceptionThe session is currently paused, please resume
ulonglong com::pcbsys::nirvana::client::nSession::getReceivedEventCount ( )

Return the number of events received by this session.

Returns
the number of sent received
std::string com::pcbsys::nirvana::client::nSession::getRemoteId ( )

Returns the rname that this session has used.

Returns
String representation of the rname
Exceptions
nSessionNotConnectedExceptionCurrent session is not connected
ulonglong com::pcbsys::nirvana::client::nSession::getSentEventCount ( )

Return the number of events sent by this session.

Returns
the number of sent events
std::string com::pcbsys::nirvana::client::nSession::getServerRealmName ( )

Returns the sessions server realm name.

Returns
Realm Server name
Exceptions
nSessionNotConnectedExceptionIf the session is not currently connected with the server
ulonglong com::pcbsys::nirvana::client::nSession::getServerTime ( )

Gets the current time on the server.

Returns
The current time on the Realm Server as a longlong value
Exceptions
nSecurityExceptionUser is not authorised for the function
nSessionNotConnectedExceptionCurrent session is not connected
nUnexpectedResponseExceptionInternal Error has occurred, since we received a response from the server out of sequence
nRequestTimedOutExceptionThe server has not responded to the request in the timeout period
nSessionPausedExceptionThe session is currently paused, please resume
ulonglong com::pcbsys::nirvana::client::nSession::getSessionConnectionId ( )

Returns the unique connection id associated with this session by the server.

Returns
the server's connection id for this nSession
virtual const std::string& com::pcbsys::nirvana::client::nSession::getStreamId ( )
virtual

Get the stream Id for this session if initialised with an nDataStreamListener.

Returns
a string representation of the stream id
nSubject** com::pcbsys::nirvana::client::nSession::getSubject ( int &  numSubject)

Gets the subject associated with this nirvana session.

Returns
an nSubject array object with the subject details associated with the session
Exceptions
nSessionNotConnectedExceptionIf the session is not currently connected with the server
nSubject* com::pcbsys::nirvana::client::nSession::getSubjectObject ( )

Gets the subject associated with this nirvana session.

Returns
an nSubject object with the subject details associated with the session
Exceptions
nSessionNotConnectedExceptionIf the session is not currently connected with the server
void com::pcbsys::nirvana::client::nSession::init ( )

Initialises a session object, opening the physical connection to the server.

Exceptions
nRealmUnreachableExceptionif the realm is currently not available
nSessionNotConnectedExceptionCurrent session is not connected
nSessionAlreadyInitialisedExceptionThe session has already been initialised
nSecurityExceptionInsufficient privileges
void com::pcbsys::nirvana::client::nSession::init ( bool  disconnectIfClusterFails)

Initialises a session object, opening the physical connection to the server.

Parameters
disconnectIfClusterFails- if the cluster loses quorum, should this nSession become disconnected (true/false)
Exceptions
nRealmUnreachableExceptionif the realm is currently not available
nSessionNotConnectedExceptionCurrent session is not connected
nSessionAlreadyInitialisedExceptionThe session has already been initialised
nSecurityExceptionInsufficient privileges
Since
4.0
nDataStream* com::pcbsys::nirvana::client::nSession::init ( nDataStreamListener pStreamListener)

Initialises a session object, opening the physical connection to the server and supplies a nDataStreamListener to receive asynchronous direct events.

Exceptions
nRealmUnreachableExceptionif the realm is currently not available
nSessionNotConnectedExceptionCurrent session is not connected
nSessionAlreadyInitialisedExceptionThe session has already been initialised
nSecurityExceptionInsufficient privileges
Parameters
pStreamListener- a stream listener to receive asynchronous events
Since
6.0
nDataStream* com::pcbsys::nirvana::client::nSession::init ( bool  fails,
nDataStreamListener pStreamListener 
)

Initialises a session object, opening the physical connection to the server and supplies a nDataStreamListener to receive asynchronous direct events.

Parameters
disconnectIfClusterFails- if the cluster loses quorum, should this nSession become disconnected (true/false)
Exceptions
nRealmUnreachableExceptionif the realm is currently not available
nSessionNotConnectedExceptionCurrent session is not connected
nSessionAlreadyInitialisedExceptionThe session has already been initialised
nSecurityExceptionInsufficient privileges
Parameters
fails- if the cluster loses quorum, should this nSession become disconnected (true/false)
pStreamListener- a stream listener to receive asynchronous events
Since
6.0
bool com::pcbsys::nirvana::client::nSession::isConnected ( )

Returns true if this session is still connected with the remote realm.

Returns
result of the test
bool com::pcbsys::nirvana::client::nSession::isMemberOfCluster ( )

If the realm this session is connected to is part of a cluster then this function will return true.

Returns
true if part of a cluster
bool com::pcbsys::nirvana::client::nSession::isPaused ( )

Returns true if this session is paused.

Returns
result of the test
void com::pcbsys::nirvana::client::nSession::pause ( bool  release)

This function pauses delivery of new events to all subscribed nEventListeners until resume is called.

Parameters
releasespecifies whether to release any outstanding synchronous requests awaiting responses from the server
virtual void com::pcbsys::nirvana::client::nSession::pauseStream ( )
virtual

Pause the events being received by the Data Group Listener.

This is not currently implemented

Exceptions
Exception
Since
6.0
bool com::pcbsys::nirvana::client::nSession::pingServer ( long  timeoutMS,
bool  autoClose = false 
)

Sends an event to the server, to see if the server is still responding to requests.

The call is synchronous, meaning that the call will wait for a response from the server before returning to the caller. Note that this call is completely exception safe (ie. no exceptions are thrown).

Parameters
timeoutMSindicates the amount of time in milliseconds to wait for a response.
autoCloseis optional, and will automatically close the session if the value is true and the value in timeoutMS has elapsed. After closure, the session will attempt to automatically reconnect to the server.
Returns
true if the session could contact the server, false otherwise.
nDeleteResult** com::pcbsys::nirvana::client::nSession::remove ( nChannelAttributes **  attr,
int  numAttr,
int &  numResults 
)

Deletes all channels in the array of nChannelAttributes array.

Parameters
attrThe channel attributes array to delete
numAttrThe length of the attr array
numResultsThe length of the array that is returned
Returns
returns an nDeleteResult array representing the deleted nirvana channels or queues or exceptions
Exceptions
nUnknownRemoteRealmException">The remote realm responded with an unknown exception
nSecurityException">User is not authorised for the function
nChannelNotFoundException">The channel doesn't exist
nSessionNotConnectedException">Current session is not connected
nUnexpectedResponseException">Internal Error has occured, since we received a response from the server out of sequence
nRequestTimedOutException">The server has not responded to the request in the timeout period
nIllegalArgumentException">Illegal parameter, check the message for more information
nSessionPausedException">The session is currently paused, please resume
void com::pcbsys::nirvana::client::nSession::removeAsyncExceptionListener ( nAsyncExceptionListener pListener)

Removes an already added asynchronous exception listener, which will not be notified of asynchronous exceptions anymore.

Parameters
*pListenerThe asynchronous exception listener to be added
Exceptions
nIllegalArgumentExceptionIllegal parameter, check the message for more information
void com::pcbsys::nirvana::client::nSession::removeConnectionQueueListener ( nConnectionQueueListener pListener)

Removes an already added connection queue listener, which will not be notified of queue state changes anymore.

Parameters
*pListenerThe asynchronous exception listener to be added
Exceptions
nIllegalArgumentExceptionif the listener is Null of if no listener registered
void com::pcbsys::nirvana::client::nSession::removeReconnectHandler ( nReconnectHandler pHandler)

Remove the reconnect handler from the session.

Parameters
*pHandler- the reconnect handler to be removed
virtual void com::pcbsys::nirvana::client::nSession::resumeStream ( )
virtual

Resumes the events being received by the Data Group Listener.

This is not currently implemented

Exceptions
Exception
Since
6.0
void com::pcbsys::nirvana::client::nSession::setClientKeepAlive ( long  time)

Dynamically reset the client keep alive interval of a particular session.

Parameters
timeindicates the time (in milliseconds) of the new keep alive interval.
static void com::pcbsys::nirvana::client::nSession::setMaxBufferSize ( long  size)
static

Sets the maximum client buffer size.

The default value is 1 MB

Parameters
sizean int specifying the new maximum client buffer size
Exceptions
nIllegalArgumentExceptionIllegal parameter, check the message for more information
void com::pcbsys::nirvana::client::nSession::setThreadPoolSize ( int  size)

Set size of thread pool.

Parameters
sizethe size of the thread pool
virtual nSubscriptionAttributes** com::pcbsys::nirvana::client::nSession::subscribe ( nSubscriptionAttributes **  ppAttributes,
int  nAttribute 
)
virtual

Subscribe to the channels specified within the nSubscriptionAttributes array.

Parameters
ppAttributes- the details of each channel subscription
nAttribute- the returned length of ppAttributes param nAttribute - the number of attributes
Returns
the response from the server will be either an Exception or an nChannel within each subscription attributes object
Exceptions
Exceptionif the server encounters any problem during this operation
nIllegalArgumentExceptionif attributes contains a illegal value
See Also
nSubscriptionAttributes
void com::pcbsys::nirvana::client::nSession::unblockThread ( const std::string &  name)

Unblocks the thread of the given name that my be in a synchronous call.

Parameters
namethe name of the thread
virtual void com::pcbsys::nirvana::client::nSession::write ( nConsumeEvent **  evts,
int  nevents,
nAbstractChannel destination 
)
virtual

Sends the events to the specified channel / queue.

Parameters
evtsthe array of events to write to the channel
neventsthe size of the evts array
destinationthe stream to write to
virtual void com::pcbsys::nirvana::client::nSession::write ( nConsumeEvent **  evts,
int  nevents,
nAbstractChannel **  destinations,
int  ndestinations 
)
virtual

Sends the events to the specified channels / queues.

Parameters
evtsthe array of events to write to the channels / queues
destinationsthe array of channels / queues to write to
ndestinationsthe size of the destinations array
virtual void com::pcbsys::nirvana::client::nSession::write ( nConsumeEvent **  evts,
int  nevents,
nAbstractChannel **  destinations,
int  ndestinations,
bool  waitForReply 
)
virtual

Sends the events to the specified channels / queues.

Parameters
evtsthe array of events to write to the channels / queues
neventsthe size of the evts array
destinationsthe array of channels / queues to write to
ndestinationsthe size of the destinations array
waitForReplyif true then the method will not return until it receives a response from the server
virtual void com::pcbsys::nirvana::client::nSession::write ( nConsumeEvent evts,
nAbstractChannel **  destinations,
int  ndestinations,
bool  waitForReply 
)
virtual

Sends the event to the specified channels / queues.

Parameters
evtsthe event to write to the channels / queues
destinationsthe array of channels / queues to write to
ndestinationsthe size of the destinations array
waitForReplyif true then the method will not return until it receives a response from the server
virtual void com::pcbsys::nirvana::client::nSession::write ( nConsumeEvent **  evts,
int  nevents,
nAbstractChannel destination,
bool  waitForReply 
)
virtual

Sends the events to the specified channels / queues.

Parameters
evtsthe array of events to write to the channel / queue
neventsthe size of the evts array
destinationthe channel / queue to write to
waitForReplyif true then the method will not return until it receives a response from the server
virtual void com::pcbsys::nirvana::client::nSession::write ( nConsumeEvent evt,
nAbstractChannel destination,
bool  waitForReply 
)
virtual

Sends the event to the specified channel / queue.

Parameters
evtthe event to write to the channel / queue
destinationthe channel / queue to write to
waitForReplyif true then the method will not return until it receives a response from the server
virtual void com::pcbsys::nirvana::client::nSession::write ( std::map< nConsumeEvent *, nAbstractChannel * > *  list,
bool  waitForResponse 
)
virtual

Sends each event in the list to its corresponding channel / queue.

Parameters
listkey,value list of nConsumeEvent and channel / queue
waitForResponseif true then the method will not return until it receives a response from the server
virtual void com::pcbsys::nirvana::client::nSession::writeDataGroup ( nConsumeEvent pEvt,
nDataGroup pDataGroup,
bool  waitForResponse = false,
bool  registered = false 
)
virtual

Sends the event to the specified data group.

Parameters
pEvtthe event to write to the data group
pDataGroupthe data group to write to
waitForResponsewhether to wait for a response. Default = false
registeredwhether the event is registered. Default = false
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::writeDataGroup ( nConsumeEvent pEvt,
nDataGroup **  ppDataGroups,
int  numGroup,
bool  waitForResponse = false 
)
virtual

Sends the event to all of the specified data groups.

Parameters
pEvtthe event to write to the data groups
ppDataGroupsthe array of data groups to write to
numGroupthe length of the ppDataGroups array
waitForResponsewhether to wait for a response. Default = false
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::writeDataGroup ( nConsumeEvent **  ppEvts,
int  numEvent,
nDataGroup pDataGroup,
bool  waitForResponse = false 
)
virtual

Sends the list of events to the specified data group.

Parameters
ppEvtsthe array of events to write to the group
numEventthe number of events in the array
pDataGroupthe data group to write to
waitForResponsewhether to wait for a response. Default = false
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::writeDataGroup ( nConsumeEvent **  ppEvts,
int  numEvent,
nDataGroup **  ppDataGroups,
int  numGroup,
bool  waitForResponse = false 
)
virtual

Sends the events to the specified streams.

Parameters
ppEvtsthe array of events to write to the stream
numEventthe number of events in the array
ppDataGroupsthe groups to write to
numGroupthe number of groups in the array
waitForResponsewhether to wait for a response. Default = false
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::writeDataGroup ( std::map< nConsumeEvent *, nDataGroup * > &  list,
bool  waitForResponse = false,
bool  registered = false 
)
virtual

Sends each event in the list to its corresponding data group.

Parameters
listthe <key,value> list of nConsumeEvent and data groups
waitForResponsewhether to wait for a response. Default = false
registeredwhether the event is registered. Default = false
virtual void com::pcbsys::nirvana::client::nSession::writeDataStream ( nConsumeEvent pEvt,
nDataStream pStream,
bool  waitForResponse = false 
)
virtual

Sends the event to the specified stream.

Parameters
pEvtthe event to write to the stream
pStreamthe stream to write to
waitForResponsewhether to wait for a response. Default = false
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::writeDataStream ( nConsumeEvent pEvt,
nDataStream **  ppStreams,
int  numStream,
bool  waitForResponse = false 
)
virtual

Sends the event to the specified streams.

Parameters
pEvtthe event to write to the streams
ppStreamsthe array of streams to write to
numStreamthe number of streams in the array
waitForResponsewhether to wait for a response. Default = false
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::writeDataStream ( nConsumeEvent **  ppEvts,
int  numEvent,
nDataStream pStream,
bool  waitForResponse = false 
)
virtual

Sends the events to the specified stream.

Parameters
ppEvtsthe array of events to write to the stream
numEventthe number of events in the array
pStreamthe stream to write to
waitForResponsewhether to wait for a response. Default = false
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0
virtual void com::pcbsys::nirvana::client::nSession::writeDataStream ( nConsumeEvent **  ppEvts,
int  numEvent,
nDataStream **  ppStreams,
int  numStream,
bool  waitForResponse = false 
)
virtual

Sends the events to the specified streams.

Parameters
ppEvtsthe array of events to write to the stream
numEventthe number of events in the array
ppStreamsthe array of streams to write to
numStreamthe number of streams in the array
waitForResponsewhether to wait for a response. Default = false
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0
void com::pcbsys::nirvana::client::nSession::writeDataStream ( std::map< nConsumeEvent *, nDataStream * > *  list,
bool  waitForResponse = false,
bool  isRegisteredEvent = false 
)

Sends each event in the list to its corresponding data stream.

Parameters
waitForResponseif true then the method will not return until it receives a response from the server
registeredwhether the event is registered. Default = false
listthe <key,value> list of nConsumeEvent and data streams
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
Since
6.0