com::pcbsys::nirvana::nAdminAPI::nConnectionDetails Class Reference

This class contains the details about an individual connection. More...

#include <nConnectionDetails.h>

Inheritance diagram for com::pcbsys::nirvana::nAdminAPI::nConnectionDetails:
com::pcbsys::nirvana::nAdminAPI::nChannelConnectionDetails

Public Member Functions

virtual std::map< std::string,
nNode * > & 
getBoundNodes ()
 Returns an collection of nNodes that this connection is bound to. More...
 
virtual longlong getEventsReceived ()
 Returns the number of events that this connection has received from the remote client. More...
 
virtual longlong getEventsTransmitted ()
 Returns the number of events sent to the remote client. More...
 
virtual const std::string & getId ()
 Returns the unique connection ID used to identify this connection. More...
 
virtual const std::string & getLastReceivedEvent ()
 Returns a protocol description of the last event received from the connection. More...
 
virtual const std::string & getLastTransmittedEvent ()
 Returns a protocol description of the last event transmitted from the connection. More...
 
virtual int getLatency ()
 This field is updated by the client heartbeat and as such only changes when the server receives a heart beat from the client. More...
 
virtual std::string getProtocol ()
 This method returns the protocol string, currently one of NSP, NHP, NSPS or NHPS. More...
 
virtual int getQueueSize ()
 This queue size is the internal server buffer where all events are pushed awaiting delivery A large number here or a number that is not moving maybe indicative of a slow or problematic connection. More...
 
virtual const std::string & getRealmName ()
 Returns the name of the realm. More...
 
virtual longlong getReceivedByteCount ()
 Returns the number of bytes that this connection has received from the remote client. More...
 
virtual const std::string & getSelector (nLeafNode *pLeafNode)
 Returns the Selector that the connection used to bind to a channel/queue. More...
 
virtual std::string * getSubject (int &numSubject)
 Returns a string that the connection used to authenticate with the server. More...
 
virtual longlong getTimeOfLastReceive ()
 Returns the timestamp since the last received event. More...
 
virtual longlong getTimeOfLastTransmit ()
 Returns the number of milliseconds since the last event was sent. More...
 
virtual longlong getTransmittedByteCount ()
 Returns the number of bytes that this connection has transmitted to the remote client. More...
 
virtual longlong getUpTime ()
 Returns the number of milliseconds that the connection has been active for. More...
 
virtual bool wasClosedByClient ()
 This method will show that after this connection has received a delete callback, whether the close was initiated by the client. More...
 

Detailed Description

This class contains the details about an individual connection.

It extends the Observable class to allow a user program to be informed about changes to the statistics of the connection.

Member Function Documentation

virtual std::map<std::string, nNode*>& com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getBoundNodes ( )
virtual

Returns an collection of nNodes that this connection is bound to.

Returns
A map of nNode objects that this connection is bound to.
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getEventsReceived ( )
virtual

Returns the number of events that this connection has received from the remote client.

Returns
a long representing the number of events received by this connection
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getEventsTransmitted ( )
virtual

Returns the number of events sent to the remote client.

Returns
a long representing the number of events transmitted by this connection
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getId ( )
virtual

Returns the unique connection ID used to identify this connection.

Returns
The connection ID as a String
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getLastReceivedEvent ( )
virtual

Returns a protocol description of the last event received from the connection.

Returns
a String containing the protocol description of the last event received
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getLastTransmittedEvent ( )
virtual

Returns a protocol description of the last event transmitted from the connection.

Returns
a String containing the protocol description of the last event transmitted
virtual int com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getLatency ( )
virtual

This field is updated by the client heartbeat and as such only changes when the server receives a heart beat from the client.

Returns
a int in milliseconds of the last request/response
virtual std::string com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getProtocol ( )
virtual

This method returns the protocol string, currently one of NSP, NHP, NSPS or NHPS.

Returns
A String indicating the protocol used by this connection
virtual int com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getQueueSize ( )
virtual

This queue size is the internal server buffer where all events are pushed awaiting delivery A large number here or a number that is not moving maybe indicative of a slow or problematic connection.

Returns
a long representing the queue size
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getRealmName ( )
virtual

Returns the name of the realm.

Returns
the name of the realm
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getReceivedByteCount ( )
virtual

Returns the number of bytes that this connection has received from the remote client.

Returns
Long count
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getSelector ( nLeafNode pLeafNode)
virtual

Returns the Selector that the connection used to bind to a channel/queue.

Parameters
leafNodeThe node being queried
Returns
the selector used for event filtering as a String
Exceptions
nAdminIllegalArgumentExceptionis thrown if leafNode is null
virtual std::string* com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getSubject ( int &  numSubject)
virtual

Returns a string that the connection used to authenticate with the server.

The first entry is the primary principal and is the only one used in the ACL validation. There will only be more than one entry in a client certificate validated SSL session which will use CN as the primary principal followed by the user supplied principal.

Returns
the string for the specified subject.
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getTimeOfLastReceive ( )
virtual

Returns the timestamp since the last received event.

Returns
a long representing the timestamp since the last received event
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getTimeOfLastTransmit ( )
virtual

Returns the number of milliseconds since the last event was sent.

Returns
a long representing the timestamp since the last transmitted event
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getTransmittedByteCount ( )
virtual

Returns the number of bytes that this connection has transmitted to the remote client.

Returns
the number of bytes transmitted by this connection as a long
virtual longlong com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::getUpTime ( )
virtual

Returns the number of milliseconds that the connection has been active for.

Returns
a long representing the number of ms the server has been up
virtual bool com::pcbsys::nirvana::nAdminAPI::nConnectionDetails::wasClosedByClient ( )
virtual

This method will show that after this connection has received a delete callback, whether the close was initiated by the client.

The client close is generated from the nSessionFactory.close(nSession) method. Other closes or disconnections will return false, since the client did not send a session close event.

Returns
true if the client initiated the session close