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...

Inherits IComparable.

Public Member Functions

void addAsyncExceptionListener (nAsyncExceptionListener listener)
 Adds a new asynchronous exception listener, which will be notified when an exception occurs while performing an asynchronous operation More...
 
void addConnectionQueueListener (nConnectionQueueListener listener)
 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 More...
 
void addConnectionQueueListener (nConnectionQueueListener listener, 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 More...
 
void addRealm (com.pcbsys.nirvana.client.nRealm newRealm)
 Adds (Joins) another realm to the realm this session is connected to More...
 
void addRealm (com.pcbsys.nirvana.client.nRealm newRealm, nSession session)
 Adds (Joins) another realm to the realm this session is connected to More...
 
void addReconnectHandler (nReconnectHandler handler)
 Add a session reconnect handler to the session. More...
 
void close ()
 Closes this session, disconnecting from the server and killing all threads
 
void commitRegisteredEventsToDataGroups (IEnumerable< nRegisteredEvent > events)
 Commit the nRegisteredEvent objects to the server. More...
 
void commitRegisteredEventsToDataGroups (IEnumerable< nRegisteredEvent > events, bool replace)
 Commit the nRegisteredEvent objects to the server. More...
 
int CompareTo (object obj)
 Compares this instance with a specified session object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified object More...
 
virtual nCreateResult[] create (com.pcbsys.nirvana.client.nChannelAttributes[] attr)
 Creates new channels on the realm this session is connected. More...
 
nChannel createChannel (com.pcbsys.nirvana.client.nChannelAttributes attr)
 Creates a new channel on the realm this session is connected. More...
 
nChannel createChannel (com.pcbsys.nirvana.client.nChannelAttributes attr, long p_initialEID)
 Creates a new channel on the realm this session is connected. More...
 
nChannel createChannel (com.pcbsys.nirvana.client.nChannelAttributes attr, long p_initialEID, long privMask)
 Creates a new channel on the realm this session is connected. More...
 
virtual nDataGroup createDataGroup (string dataGroupName)
 Create a new data group on the server. More...
 
virtual nDataGroup createDataGroup (string dataGroupName, bool enableMulticast)
 Create a new data group on the server. More...
 
virtual nDataGroup createDataGroup (string dataGroupName, nDataGroupListener listener)
 Create a new data group on the server. More...
 
virtual nDataGroup createDataGroup (string dataGroupName, nDataGroupListener listener, bool enableMulticast)
 Create a new data group on the server. More...
 
virtual nDataGroup createDataGroup (string dataGroupName, nDataGroupListener listener, nConflationAttributes conflationAttributes)
 Create a new data group on the server. More...
 
virtual nDataGroup createDataGroup (string dataGroupName, nDataGroupListener listener, nConflationAttributes conflationAttributes, bool enableMulticast)
 Create a new data group on the server. More...
 
virtual nDataGroup createDataGroup (string dataGroupName, nDataGroupListener listener, nConflationAttributes conflationAttributes, bool enableMulticast, int groupPriority)
 Create a new data group on the server. More...
 
nDataGroup createDataGroup (String dataGroupName, nDataGroupListener listener, nConflationAttributes conflationAttributes, bool enableMulticast, bool dropExpiredEvents, int groupPriority)
 Create a new data group on the server. More...
 
virtual IEnumerable< nDataGroupcreateDataGroups (string[] dataGroupNames)
 Create new data groups on the server More...
 
virtual IEnumerable< nDataGroupcreateDataGroups (string[] dataGroupNames, bool enableMulticast)
 Create new data groups on the server More...
 
virtual IEnumerable< nDataGroupcreateDataGroups (string[] dataGroupNames, nConflationAttributes conflationAttributes)
 Create new data groups on the server More...
 
virtual IEnumerable< nDataGroupcreateDataGroups (string[] dataGroupNames, nConflationAttributes conflationAttributes, bool enableMulticast)
 Create new data groups on the server More...
 
nQueue createQueue (com.pcbsys.nirvana.client.nChannelAttributes attr, long privMask)
 Creates a new queue on the realm this session is connected. More...
 
nQueue createQueue (com.pcbsys.nirvana.client.nChannelAttributes attr)
 Creates a new queue on the realm this session is connected. More...
 
virtual nDeleteResult[] delete (com.pcbsys.nirvana.client.nChannelAttributes[] attr)
 Deletes all channels in the array of nChannelAttributes array. More...
 
void deleteChannel (com.pcbsys.nirvana.client.nChannelAttributes attr)
 Deletes a nirvana channel that exists on the realm this session is connected to, or a joined realm. More...
 
void deleteDataGroup (String[] dataGroupNames)
 Deletes the specified data groups from the server More...
 
virtual void deleteDataGroup (string dataGroupName)
 Deletes the specified data group from the server More...
 
virtual void deleteDataGroup (nDataGroup group)
 Deletes the specified data group from the server More...
 
void deleteDataGroup (nDataGroup[] groups)
 Deletes the specified data group from the server More...
 
void deleteQueue (com.pcbsys.nirvana.client.nChannelAttributes attr)
 Deletes a nirvana queue that exists on the realm this session is connected to, or a joined realm. More...
 
void deleteRealm (nRealm aRealm)
 Removes a logical connection from the connected realm to aRealm More...
 
virtual IEnumerable< nFindResultfind (nChannelAttributes[] attr)
 Finds and returns an IEnumerable of nFindResult objects that correspond to the results of the find operations on each nChannelAttributes. More...
 
nChannel findChannel (com.pcbsys.nirvana.client.nChannelAttributes attr)
 Finds and returns a nirvana channel that exists on the realm this session is connected to, or a joined realm. More...
 
nQueue findQueue (com.pcbsys.nirvana.client.nChannelAttributes attr)
 Finds and returns a nirvana queue that exists on the realm this session is connected to, or a joined realm. More...
 
string get3rdPartyCookie ()
 Returns any 3rd party cookies that may have been honoured More...
 
nSessionAttributes getAttributes ()
 Gets the session attribute object associated with this session More...
 
com.pcbsys.nirvana.client.nChannelAttributes[] getChannels ()
 Returns a list of all known channels and queues More...
 
com.pcbsys.nirvana.client.nChannelAttributes[] getChannels (string folder)
 Returns a list of all known channels and queues More...
 
string getConnectionList ()
 Returns a comma separated list of RNAMEs which can be used to access the realm or cluster namespace. More...
 
int getCurrentLatency ()
 Returns the round trip time of the last synchronous request that was made More...
 
virtual IEnumerable< nDataGroupgetDataGroups ()
 Get all known data groups on the server More...
 
virtual IEnumerable< nDataGroupgetDataGroups (string prefix)
 Get all known data groups on the server that match a prefix More...
 
virtual IEnumerable< nDataGroupgetDataGroups (nDataGroupListener listener)
 Get all known data groups on the server and register a listener. More...
 
virtual IEnumerable< nDataGroupgetDataGroups (string prefix, nDataGroupListener listener)
 Get all known data groups on the server that match a prefix and register a listener. More...
 
virtual nDataGroup getDefaultDataGroup ()
 Return the default nDataGroup object More...
 
virtual nDataGroup getDefaultDataGroup (nDataGroupListener listener)
 Return the default nDataGroup object, and provide a listener that will receive callbacks when new streams or groups are created or deleted More...
 
string getId ()
 Returns the unique session Id for this session More...
 
long 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...
 
long getOutputByteCount ()
 Returns the number of bytes sent to the server using this session object More...
 
long getQueueSize ()
 Returns the outbound connection queue size More...
 
com.pcbsys.nirvana.client.nRealm getRealm (String name)
 Gets a reference to a realm that is already joined More...
 
com.pcbsys.nirvana.client.nRealm[] getRealms ()
 Returns a list of all known realms on the connected realm More...
 
long getReceivedEventCount ()
 Return the number of events received by this session More...
 
string getRemoteId ()
 Returns the rname that this session has used More...
 
long getSentEventCount ()
 Return the number of events sent by this session More...
 
string getServerRealmName ()
 Returns the sessions server realm name More...
 
long getServerTime ()
 Gets the current time on the server More...
 
long getSessionConnectionId ()
 Returns the unique connection id associated with this session by the server. More...
 
virtual string getStreamId ()
 Get the stream Id for this session if initialised with an nDataStreamListener More...
 
nSubject[] getSubject ()
 Gets the subject associated with this nirvana session More...
 
nSubject getSubjectObject ()
 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 fails)
 Initialises a session object, opening the physical connection to the server More...
 
nDataStream init (nDataStreamListener streamListener)
 Initialises a session object, opening the physical connection to the server More...
 
nDataStream init (bool fails, nDataStreamListener streamListener)
 Initialises a session object, opening the physical connection to the server 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...
 
void removeAsyncExceptionListener (nAsyncExceptionListener listener)
 Removes an already added asynchronous exception listener, which will not be notified of asynchronous exceptions anymore. More...
 
void removeConnectionQueueListener (nConnectionQueueListener listener)
 Removes an already added connection queue listener, which will not be notified of queue state changes anymore. More...
 
void removeReconnectHandler (nReconnectHandler handler)
 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...
 
nDataGroup sendServerCreateDataGroup (String dataGroupName, nDataGroupListener listener, nConflationAttributes conflationAttributes, bool enableMulticast, bool dropExpiredEvents, int groupPriority)
 This method is for internal use only More...
 
void setHTTPURLParameter (String param)
 Allows the HTTP communication between the client and the realm to include an optional parameter that can be analysed by load balance servers or proxies More...
 
void setLogListener (nLogListener l)
 Add a local log listener to this session to receive information being logged internally through the client APIs logging mechanism. More...
 
virtual IEnumerable
< nSubscriptionAttributes
subscribe (nSubscriptionAttributes[] attributes)
 Subscribe to the channels specified within the nSubscriptionAttributes array More...
 
void unblockThread (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. More...
 
virtual void write (nConsumeEvent evt, nAbstractChannel[] destinations)
 Sends the event to the specified channel / queue More...
 
virtual void write (nConsumeEvent[] evts, nAbstractChannel destination)
 Sends the events to the specified channel / queue More...
 
virtual void write (nConsumeEvent[] evts, nAbstractChannel[] destinations)
 Sends the events to the specified channels / queues More...
 
virtual void write (nConsumeEvent[] evts, nAbstractChannel[] destinations, bool waitForReply)
 Sends the events to the specified channels / queues More...
 
virtual void write (nConsumeEvent evts, nAbstractChannel[] destinations, bool waitForReply)
 Sends the event to the specified channels / queues More...
 
virtual void write (nConsumeEvent[] evts, 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 (Dictionary< nConsumeEvent, nAbstractChannel > list, bool waitForResponse)
 Sends each event in the list to its corresponding channel / queue More...
 
virtual void writeDataGroup (nConsumeEvent evt, nDataGroup dataGroup)
 Sends the event to the specified data group More...
 
virtual void writeDataGroup (nConsumeEvent evt, nDataGroup[] dataGroups)
 Sends the event to all of the specified data groups More...
 
virtual void writeDataGroup (nConsumeEvent[] evts, nDataGroup dataGroup)
 Sends the list of events to the specified data group More...
 
virtual void writeDataGroup (Dictionary< nConsumeEvent, nDataGroup > list)
 Sends each event in the list to its corresponding data group More...
 
virtual void writeDataGroup (nConsumeEvent[] evts, nDataGroup[] dataGroups)
 Sends the list of events to all of the specified data groups More...
 
virtual void writeDataGroup (nConsumeEvent evt, nDataGroup dataGroup, bool waitForResponse)
 Sends the event to the specified data group More...
 
virtual void writeDataGroup (nConsumeEvent evt, nDataGroup[] dataGroups, bool waitForResponse)
 Sends the event to all of the specified data groups More...
 
virtual void writeDataGroup (nConsumeEvent[] evts, nDataGroup dataGroup, bool waitForResponse)
 Sends the list of events to the specified data group More...
 
virtual void writeDataGroup (nConsumeEvent[] evts, nDataGroup[] dataGroups, bool waitForResponse)
 Sends the list of events to all of the specified data groups More...
 
virtual void writeDataStream (nConsumeEvent evt, nDataStream stream)
 Sends the event to the specified stream ids More...
 
virtual void writeDataStream (nConsumeEvent evt, nDataStream[] streams)
 Sends the event to the specified stream ids More...
 
virtual void writeDataStream (nConsumeEvent[] evts, nDataStream stream)
 Sends the event to the specified stream ids More...
 
virtual void writeDataStream (nConsumeEvent[] evts, nDataStream[] streams)
 Sends the event to the specified stream ids More...
 
virtual void writeDataStream (nConsumeEvent evt, nDataStream stream, bool waitForResponse)
 Sends the event to the specified stream ids More...
 
virtual void writeDataStream (nConsumeEvent evt, nDataStream[] streams, bool waitForResponse)
 Sends the event to the specified stream ids More...
 
virtual void writeDataStream (nConsumeEvent[] evts, nDataStream stream, bool waitForResponse)
 Sends the event to the specified stream ids More...
 
virtual void writeDataStream (nConsumeEvent[] evts, nDataStream[] streams, bool waitForResponse)
 Sends the event to the specified stream ids More...
 
void writeDataStream (Dictionary< nConsumeEvent, nDataStream > list)
 Sends each event in the list to its corresponding data stream More...
 
void writeDataStream (Dictionary< nConsumeEvent, nDataStream > list, bool waitForResponse)
 Sends each event in the list to its corresponding data stream More...
 

Static Public Member Functions

static int getMaxBufferSize ()
 Gets the maximum client buffer size. More...
 
static void setMaxBufferSize (int 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  listener)

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

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

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
listenerThe 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  listener,
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
listenerThe 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
unblock
Exceptions
nIllegalArgumentExceptionif the listener is Null of if already has a listener registered
void com.pcbsys.nirvana.client.nSession.addRealm ( com.pcbsys.nirvana.client.nRealm  newRealm)

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

Parameters
newRealmThe realm to join as an nRealm object
Exceptions
nRealmAlreadyBoundExceptionThe realm is known by the server
nRealmNotFoundExceptionThe realm is not known by the server
nRealmUnreachableExceptionThe specified realm is already configured
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.addRealm ( com.pcbsys.nirvana.client.nRealm  newRealm,
nSession  session 
)

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

Parameters
newRealmThe realm to join as an nRealm object
sessionA 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  handler)

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
handler- the nReconnectHandler object for this session
void com.pcbsys.nirvana.client.nSession.commitRegisteredEventsToDataGroups ( IEnumerable< nRegisteredEvent events)

Commit the nRegisteredEvent objects to the server.

Currently only registered events created for Data Group objects is supported

Parameters
eventsThe nRegisteredEvent array
void com.pcbsys.nirvana.client.nSession.commitRegisteredEventsToDataGroups ( IEnumerable< nRegisteredEvent events,
bool  replace 
)

Commit the nRegisteredEvent objects to the server.

Currently only registered events created for Data Group objects is supported

Parameters
eventsThe nRegisteredEvent array
replaceOverride the events on the server with these events
int com.pcbsys.nirvana.client.nSession.CompareTo ( object  obj)

Compares this instance with a specified session object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified object

Parameters
objSession object to compare with
Returns
A integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the value parameter. Value Condition Less than zero - This instance precedes obj. Zero This instance has the same position in the sort order as obj. Greater than zero This instance follows obj.-or- obj is null.
virtual nCreateResult [] com.pcbsys.nirvana.client.nSession.create ( com.pcbsys.nirvana.client.nChannelAttributes[]  attr)
virtual

Creates new channels on the realm this session is connected.

Parameters
attrThe channel attributes array containing the new channel or queue attributes
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 ( com.pcbsys.nirvana.client.nChannelAttributes  attr)

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
attrThe channel attributes object containing the parameters for the new channel to be created
Returns
an nChannel object representing the newly created nirvana channel
Exceptions
nUnknownRemoteRealmExceptionThe remote node responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nChannelAlreadyExistsExceptionThe requested 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 ( com.pcbsys.nirvana.client.nChannelAttributes  attr,
long  p_initialEID 
)

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
attrThe channel attributes object containing the parameters for the new channel to be created @ param initialEID The channel will be created with the first eid being set to this value by default it is set to 0 but the user can set it to any positive value
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 ( com.pcbsys.nirvana.client.nChannelAttributes  attr,
long  p_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
attrThe channel attributes object containing the parameters for the new channel to be created @ param initialEID The channel will be created with the first eid being set to this value by default it is set to 0 but the user can set it to any positive value
p_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 ( string  dataGroupName)
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 be created
Returns
the data group matching the specified name
virtual nDataGroup com.pcbsys.nirvana.client.nSession.createDataGroup ( 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 be created
enableMulticastif the data group is enabled for multicast delivery
Returns
the data group matching the specified name
virtual nDataGroup com.pcbsys.nirvana.client.nSession.createDataGroup ( string  dataGroupName,
nDataGroupListener  listener 
)
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 be created
listenerthe listener for the instance of the nDataGroupListener that will receive the callbacks for this group
Returns
the data group matching the specified name
virtual nDataGroup com.pcbsys.nirvana.client.nSession.createDataGroup ( string  dataGroupName,
nDataGroupListener  listener,
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 be created
listenerthe listener for the instance of the nDataGroupListener that will receive the callbacks for this group
enableMulticastif the data group is enabled for multicast delivery
Returns
the data group matching the specified name
virtual nDataGroup com.pcbsys.nirvana.client.nSession.createDataGroup ( string  dataGroupName,
nDataGroupListener  listener,
nConflationAttributes  conflationAttributes 
)
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 be created
listenerthe listener for the instance of the nDataGroupListener that will receive the callbacks for this group
conflationAttributesthe conflation strategy to use on the data group
conflationMergeif the conflation engine will merge multiple events or just replace the event
Returns
the data group matching the specified name
virtual nDataGroup com.pcbsys.nirvana.client.nSession.createDataGroup ( string  dataGroupName,
nDataGroupListener  listener,
nConflationAttributes  conflationAttributes,
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 be created
listenerthe listener for the instance of the nDataGroupListener that will receive the callbacks for this group
conflationAttributesthe conflation strategy to use on the data group
enableMulticastif the data group is enabled for multicast delivery
Returns
the data group matching the specified name
virtual nDataGroup com.pcbsys.nirvana.client.nSession.createDataGroup ( string  dataGroupName,
nDataGroupListener  listener,
nConflationAttributes  conflationAttributes,
bool  enableMulticast,
int  groupPriority 
)
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 be created
listenerthe listener for the instance of the nDataGroupListener that will receive the callbacks for this group
conflationAttributesthe conflation strategy to use on the data group
enableMulticastif the data group is enabled for multicast delivery
groupPrioritya priority to assign to messages delivered through this data group. This value is between 1 and 10, with 10 having the highest priority.
Returns
the data group matching the specified name
nDataGroup com.pcbsys.nirvana.client.nSession.createDataGroup ( String  dataGroupName,
nDataGroupListener  listener,
nConflationAttributes  conflationAttributes,
bool  enableMulticast,
bool  dropExpiredEvents,
int  groupPriority 
)

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 be created
listenerthe listener for the instance of the nDataGroupListener that will receive the callbacks for this group
conflationAttributesthe conflation strategy to use on the data group
enableMulticastif the data group is enabled for multicast delivery
enableMulticastif set then this datagroup will use the servers multicast configuration to deliver events to clients which can receive events via multicast
groupPrioritya priority to assign to messages delivered through this data group. This value is between 1 and 10, with 10 having the highest priority.
Returns
the data group matching the specified name
virtual IEnumerable<nDataGroup> com.pcbsys.nirvana.client.nSession.createDataGroups ( string[]  dataGroupNames)
virtual

Create new data groups on the server

Parameters
dataGroupNamesthe names of the data groups to create
Returns
An IEnumerable of data groups matching the names specified
virtual IEnumerable<nDataGroup> com.pcbsys.nirvana.client.nSession.createDataGroups ( string[]  dataGroupNames,
bool  enableMulticast 
)
virtual

Create new data groups on the server

Parameters
dataGroupNamesthe names of the data groups to create
enableMulticastif the data groups are enabled for multicast delivery
Returns
An IEnumerable of data groups matching the names specified
virtual IEnumerable<nDataGroup> com.pcbsys.nirvana.client.nSession.createDataGroups ( string[]  dataGroupNames,
nConflationAttributes  conflationAttributes 
)
virtual

Create new data groups on the server

Parameters
dataGroupNamesthe names of the data groups to create
conflationAttributesthe conflation strategy to be applied to the data groups
Returns
An IEnumerable of data groups matching the names specified
virtual IEnumerable<nDataGroup> com.pcbsys.nirvana.client.nSession.createDataGroups ( string[]  dataGroupNames,
nConflationAttributes  conflationAttributes,
bool  enableMulticast 
)
virtual

Create new data groups on the server

Parameters
dataGroupNamesthe names of the data groups to create
conflationAttributesthe conflation strategy to be applied to the data groups
enableMulticastif the data groups are enabled for multicast delivery
Returns
An IEnumerable of data groups matching the names specified
nQueue com.pcbsys.nirvana.client.nSession.createQueue ( com.pcbsys.nirvana.client.nChannelAttributes  attr,
long  privMask 
)

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
attrThe 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
nQueue com.pcbsys.nirvana.client.nSession.createQueue ( com.pcbsys.nirvana.client.nChannelAttributes  attr)

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
attrThe channel attributes object containing the parameters for the new queue to be created
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
virtual nDeleteResult [] com.pcbsys.nirvana.client.nSession.delete ( com.pcbsys.nirvana.client.nChannelAttributes[]  attr)
virtual

Deletes all channels in the array of nChannelAttributes array.

Parameters
attrThe channel attributes array to delete
Returns
an nDeleteResult array representing the deleted nirvana channels or queues or exceptions
Exceptions
nUnknownRemoteRealmExceptionThe remote realm responded with an unknown exception
nSecurityExceptionUser is not authorised for the function
nChannelNotFoundExceptionThe channel doesn't exist
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
void com.pcbsys.nirvana.client.nSession.deleteChannel ( com.pcbsys.nirvana.client.nChannelAttributes  attr)

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
attrThe 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 ( String[]  dataGroupNames)

Deletes the specified data groups from the server

Parameters
dataGroupNamesThe array of names corresponding to data groups to delete
virtual void com.pcbsys.nirvana.client.nSession.deleteDataGroup ( string  dataGroupName)
virtual

Deletes the specified data group from the server

Parameters
dataGroupNamethe name of the group to delete
virtual void com.pcbsys.nirvana.client.nSession.deleteDataGroup ( nDataGroup  group)
virtual

Deletes the specified data group from the server

Parameters
groupThe data group to delete
void com.pcbsys.nirvana.client.nSession.deleteDataGroup ( nDataGroup[]  groups)

Deletes the specified data group from the server

Parameters
groupsan array of data groups to delete
void com.pcbsys.nirvana.client.nSession.deleteQueue ( com.pcbsys.nirvana.client.nChannelAttributes  attr)

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
attrThe 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  aRealm)

Removes a logical connection from the connected realm to aRealm

<param="aRealm"> a nRealm object for the realm to remove the logical connection for

virtual IEnumerable<nFindResult> com.pcbsys.nirvana.client.nSession.find ( nChannelAttributes[]  attr)
virtual

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

Parameters
attrThe channel attributes of the channels / queues to be found
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 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.findChannel ( com.pcbsys.nirvana.client.nChannelAttributes  attr)

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

Parameters
attrThe 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 ( com.pcbsys.nirvana.client.nChannelAttributes  attr)

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

Parameters
attrThe 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
string com.pcbsys.nirvana.client.nSession.get3rdPartyCookie ( )

Returns any 3rd party cookies that may have been honoured

Returns
String value of all 3rd party cookies honoured
Exceptions
nSessionNotConnectedExceptionCurrent session is not connected
nSessionAttributes com.pcbsys.nirvana.client.nSession.getAttributes ( )

Gets the session attribute object associated with this session

Returns
the nSessionAttributes object associated with this session
com.pcbsys.nirvana.client.nChannelAttributes [] com.pcbsys.nirvana.client.nSession.getChannels ( )

Returns a list of all known channels and queues

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
com.pcbsys.nirvana.client.nChannelAttributes [] com.pcbsys.nirvana.client.nSession.getChannels ( string  folder)

Returns a list of all known channels and queues

Parameters
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
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.
int 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 IEnumerable<nDataGroup> com.pcbsys.nirvana.client.nSession.getDataGroups ( )
virtual

Get all known data groups on the server

Returns
A list of nDataGroup objects from the server
virtual IEnumerable<nDataGroup> com.pcbsys.nirvana.client.nSession.getDataGroups ( string  prefix)
virtual

Get all known data groups on the server that match a prefix

Parameters
prefixA string prefix to match against existing data groups, only those matching will be returned
Returns
A list of nDataGroup objects from the server
virtual IEnumerable<nDataGroup> com.pcbsys.nirvana.client.nSession.getDataGroups ( nDataGroupListener  listener)
virtual

Get all known data groups on the server and register a listener.

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

Parameters
listenerThe listener to receive updates for all groups
Returns
A list of nDataGroup objects from the server
virtual IEnumerable<nDataGroup> com.pcbsys.nirvana.client.nSession.getDataGroups ( string  prefix,
nDataGroupListener  listener 
)
virtual

Get all known data groups on the server that match a prefix and register a listener.

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

Parameters
prefixA string prefix to match against existing data groups, only those matching will be returned
listenerThe listener to receive updates for all groups
Returns
A list of nDataGroup objects from the server
virtual nDataGroup com.pcbsys.nirvana.client.nSession.getDefaultDataGroup ( )
virtual

Return the default nDataGroup object

Returns
the default group
virtual nDataGroup com.pcbsys.nirvana.client.nSession.getDefaultDataGroup ( nDataGroupListener  listener)
virtual

Return the default nDataGroup object, and provide a listener that will receive callbacks when new streams or groups are created or deleted

Parameters
listenerthe instance of the nDataGroupListener that will receive the callbacks
Returns
the default group
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
long com.pcbsys.nirvana.client.nSession.getInputByteCount ( )

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

Returns
long 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 int 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
long com.pcbsys.nirvana.client.nSession.getOutputByteCount ( )

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

Returns
long byte count
long com.pcbsys.nirvana.client.nSession.getQueueSize ( )

Returns the outbound connection queue size

Returns
the size of the queue
com.pcbsys.nirvana.client.nRealm com.pcbsys.nirvana.client.nSession.getRealm ( 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
com.pcbsys.nirvana.client.nRealm [] com.pcbsys.nirvana.client.nSession.getRealms ( )

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
long com.pcbsys.nirvana.client.nSession.getReceivedEventCount ( )

Return the number of events received by this session

Returns
the number of sent received
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
long com.pcbsys.nirvana.client.nSession.getSentEventCount ( )

Return the number of events sent by this session

Returns
the number of sent events
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
long com.pcbsys.nirvana.client.nSession.getServerTime ( )

Gets the current time on the server

Returns
The current time on the Realm Server as a long 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
long 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 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 ( )

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
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  fails)

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

Parameters
fails- 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
nDataStream com.pcbsys.nirvana.client.nSession.init ( nDataStreamListener  streamListener)

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

Parameters
streamListenera stream listener to receive asynchronous events
Returns
The ID of the nDataStream
Exceptions
nRealmUnreachableExceptionif the realm is currently not available
nSessionNotConnectedExceptionCurrent session is not connected
nSessionAlreadyInitialisedExceptionThe session has already been initialised
nSecurityExceptionInsufficient privileges
nDataStream com.pcbsys.nirvana.client.nSession.init ( bool  fails,
nDataStreamListener  streamListener 
)

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

Parameters
fails- if the cluster loses quorum, should this nSession become disconnected (true/false)
streamListenera stream listener to receive asynchronous events
Exceptions
nRealmUnreachableExceptionif the realm is currently not available
nSessionNotConnectedExceptionCurrent session is not connected
nSessionAlreadyInitialisedExceptionThe session has already been initialised
nSecurityExceptionInsufficient privileges
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

void com.pcbsys.nirvana.client.nSession.removeAsyncExceptionListener ( nAsyncExceptionListener  listener)

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

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

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

Parameters
listenerThe 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  handler)

Remove the reconnect handler from the session

Parameters
handler- 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 curently implemented

nDataGroup com.pcbsys.nirvana.client.nSession.sendServerCreateDataGroup ( String  dataGroupName,
nDataGroupListener  listener,
nConflationAttributes  conflationAttributes,
bool  enableMulticast,
bool  dropExpiredEvents,
int  groupPriority 
)

This method is for internal use only

Parameters
dataGroupName
listener
conflationAttributes
enableMulticast
dropExpiredEvents
groupPriority
Returns
void com.pcbsys.nirvana.client.nSession.setHTTPURLParameter ( String  param)

Allows the HTTP communication between the client and the realm to include an optional parameter that can be analysed by load balance servers or proxies

Parameters
paramParameter in the form of : ?param
void com.pcbsys.nirvana.client.nSession.setLogListener ( nLogListener  l)

Add a local log listener to this session to receive information being logged internally through the client APIs logging mechanism.

Parameters
lThe nLog Listener interface
static void com.pcbsys.nirvana.client.nSession.setMaxBufferSize ( int  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
virtual IEnumerable<nSubscriptionAttributes> com.pcbsys.nirvana.client.nSession.subscribe ( nSubscriptionAttributes[]  attributes)
virtual

Subscribe to the channels specified within the nSubscriptionAttributes array

Parameters
attributes- the details of each channel subscription
Returns
the response from the server will be either an Exception or an nChannel for each nSubscriptionAttributes returned
Exceptions
System.Exceptionif the server encounters any problem during this operation
See Also
nSubscriptionAttributes
void com.pcbsys.nirvana.client.nSession.unblockThread ( string  name)

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

Parameters
namethe name of the thread
void com.pcbsys.nirvana.client.nSession.updateConnectionListWithServerList ( )

Update the current session attributes with the RNAMEs retrieved from the server.

virtual void com.pcbsys.nirvana.client.nSession.write ( nConsumeEvent  evt,
nAbstractChannel[]  destinations 
)
virtual

Sends the event to the specified channel / queue

Parameters
evtthe event to write to the streams
destinationsthe array of channels / queues to write to
virtual void com.pcbsys.nirvana.client.nSession.write ( nConsumeEvent[]  evts,
nAbstractChannel  destination 
)
virtual

Sends the events to the specified channel / queue

Parameters
evtsthe array of events to write to the channel
destinationthe stream to write to
virtual void com.pcbsys.nirvana.client.nSession.write ( nConsumeEvent[]  evts,
nAbstractChannel[]  destinations 
)
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
virtual void com.pcbsys.nirvana.client.nSession.write ( nConsumeEvent[]  evts,
nAbstractChannel[]  destinations,
bool  waitForReply 
)
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
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,
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
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  destination,
bool  waitForReply 
)
virtual

Sends the events to the specified channels / queues

Parameters
evtsthe array of events 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 ( 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 ( Dictionary< 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  evt,
nDataGroup  dataGroup 
)
virtual

Sends the event to the specified data group

Parameters
evtthe nConsumeEvent to write to the group
dataGroupthe data group to write to
virtual void com.pcbsys.nirvana.client.nSession.writeDataGroup ( nConsumeEvent  evt,
nDataGroup[]  dataGroups 
)
virtual

Sends the event to all of the specified data groups

Parameters
evtthe nConsumeEvent to write to the groups
dataGroupsthe array of data groups to write to
virtual void com.pcbsys.nirvana.client.nSession.writeDataGroup ( nConsumeEvent[]  evts,
nDataGroup  dataGroup 
)
virtual

Sends the list of events to the specified data group

Parameters
evtsthe array of nConsumeEvents to write to the group
dataGroupthe data group to write to
virtual void com.pcbsys.nirvana.client.nSession.writeDataGroup ( Dictionary< nConsumeEvent, nDataGroup list)
virtual

Sends each event in the list to its corresponding data group

Parameters
listthe <key,value> list of nConsumeEvent and data groups
virtual void com.pcbsys.nirvana.client.nSession.writeDataGroup ( nConsumeEvent[]  evts,
nDataGroup[]  dataGroups 
)
virtual

Sends the list of events to all of the specified data groups

Parameters
evtsthe array of nConsumeEvents to write to the group
dataGroupsthe array of data groups to write to
virtual void com.pcbsys.nirvana.client.nSession.writeDataGroup ( nConsumeEvent  evt,
nDataGroup  dataGroup,
bool  waitForResponse 
)
virtual

Sends the event to the specified data group

Parameters
evtthe nConsumeEvent to write to the group
dataGroupthe group to write to
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  evt,
nDataGroup[]  dataGroups,
bool  waitForResponse 
)
virtual

Sends the event to all of the specified data groups

Parameters
evtthe nConsumeEvent to write to the groups
dataGroupsthe array of groups to write to
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[]  evts,
nDataGroup  dataGroup,
bool  waitForResponse 
)
virtual

Sends the list of events to the specified data group

Parameters
evtsthe array of nConsumeEvents to write to the group
dataGroupthe group to write to
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[]  evts,
nDataGroup[]  dataGroups,
bool  waitForResponse 
)
virtual

Sends the list of events to all of the specified data groups

Parameters
evtsthe array of nConsumeEvents to write to the group
dataGroupsthe array of groups to write to
waitForResponseif true then the method will not return until it receives a response from the server
virtual void com.pcbsys.nirvana.client.nSession.writeDataStream ( nConsumeEvent  evt,
nDataStream  stream 
)
virtual

Sends the event to the specified stream ids

Parameters
evtthe nConsumeEvent to write to the stream
streamthe stream to write to
virtual void com.pcbsys.nirvana.client.nSession.writeDataStream ( nConsumeEvent  evt,
nDataStream[]  streams 
)
virtual

Sends the event to the specified stream ids

Parameters
evtthe nConsumeEvent to write to the streams
streamsthe array of streams to write to
virtual void com.pcbsys.nirvana.client.nSession.writeDataStream ( nConsumeEvent[]  evts,
nDataStream  stream 
)
virtual

Sends the event to the specified stream ids

Parameters
evtsthe array of nConsumeEvents to write to the stream
streamthe stream to write to
virtual void com.pcbsys.nirvana.client.nSession.writeDataStream ( nConsumeEvent[]  evts,
nDataStream[]  streams 
)
virtual

Sends the event to the specified stream ids

Parameters
evtsthe array of nConsumeEvents to write to the stream
streamsthe array of streams to write to
virtual void com.pcbsys.nirvana.client.nSession.writeDataStream ( nConsumeEvent  evt,
nDataStream  stream,
bool  waitForResponse 
)
virtual

Sends the event to the specified stream ids

Parameters
evtthe nConsumeEvent to write to the stream
streamthe stream to write to
waitForResponseif true then the method will not return until it receives a response from the server
virtual void com.pcbsys.nirvana.client.nSession.writeDataStream ( nConsumeEvent  evt,
nDataStream[]  streams,
bool  waitForResponse 
)
virtual

Sends the event to the specified stream ids

Parameters
evtthe nConsumeEvent to write to the streams
streamsthe array of streams to write to
waitForResponseif true then the method will not return until it receives a response from the server
virtual void com.pcbsys.nirvana.client.nSession.writeDataStream ( nConsumeEvent[]  evts,
nDataStream  stream,
bool  waitForResponse 
)
virtual

Sends the event to the specified stream ids

Parameters
evtsthe array of nConsumeEvents to write to the stream
streamthe stream to write to
waitForResponseif true then the method will not return until it receives a response from the server
virtual void com.pcbsys.nirvana.client.nSession.writeDataStream ( nConsumeEvent[]  evts,
nDataStream[]  streams,
bool  waitForResponse 
)
virtual

Sends the event to the specified stream ids

Parameters
evtsthe array of nConsumeEvents to write to the streams
streamsthe array of streams to write to
waitForResponseif true then the method will not return until it receives a response from the server
void com.pcbsys.nirvana.client.nSession.writeDataStream ( Dictionary< nConsumeEvent, nDataStream list)

Sends each event in the list to its corresponding data stream

<param name="list" the <key,value> list of nConsumeEvent and data streams

void com.pcbsys.nirvana.client.nSession.writeDataStream ( Dictionary< nConsumeEvent, nDataStream list,
bool  waitForResponse 
)

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

<param name="list" the <key,value> list of nConsumeEvent and data streams