com::pcbsys::nirvana::client::nDataGroup Class Reference

This class represents a individual data group object. More...

#include <nDataGroup.h>

Inheritance diagram for com::pcbsys::nirvana::client::nDataGroup:
com::pcbsys::nirvana::client::nDataStream

Public Member Functions

virtual void add (nDataStream *pStream)
 Add a new stream to this data group. More...
 
void add (std::list< nDataStream * > &streams)
 Add a list of new streams to this data group. More...
 
virtual void add (nDataGroup *pGroup)
 Adds an existing data group to this data group, allowing groups to be cascaded. More...
 
virtual void addListener (nDataGroupListener *pListener)
 Add a new listener to this group so that when Streams or Groups are added or deleted the listener is notified. More...
 
virtual void addPublisher (const std::string &subject)
 Allow the specified subject to be allowed to publish to this group. More...
 
virtual void addSnoop (nDataStream *pStream)
 Add a new snoop stream to this data group. More...
 
virtual bool contains (nDataStream *pStream)
 Checks if the stream id exists in this group. More...
 
virtual bool contains (const std::string &streamId)
 Checks if the snoop stream id exists in this group. More...
 
bool contains (nDataGroup *pGroup)
 Checks if the stream id exists in this group. More...
 
virtual bool containsSnoop (nDataStream *pStream)
 Checks if the stream id exists in this group. More...
 
virtual bool containsSnoop (const std::string &streamId)
 Checks if the snoop stream id exists in this group. More...
 
nRegisteredEventcreateRegisteredEvent ()
 Registers a new nRegisteredEvent with the data stream allowing updates only to be sent through to the clients. More...
 
nConflationAttributesgetConflationAttributes ()
 Get the conflation attributes for this data group if they exist. More...
 
virtual nDataGroupgetGroup (const std::string &groupName)
 Returns the DataGroup specified, if it is contained within this group. More...
 
int getGroupCount ()
 Returns the size of the DataGroups (if any) contained within this group. More...
 
virtual std::list< nDataGroup * > * getGroups ()
 Returns the DataGroups (if any) contained within this group. More...
 
nDataGroup ** getGroupsContaining (int &nGroup)
 Locate the groups that currently contain this group. More...
 
virtual longlong getID ()
 Return the id of this nDataGroup object. More...
 
virtual const std::string & getName ()
 Return the name of the group. More...
 
virtual fSortedList
< std::string, std::string > & 
getPublishers ()
 Obtain a list of publisher ids. More...
 
nSessiongetSession ()
 Returns the session associated with this data group instance. More...
 
virtual nDataStreamgetSnoopStream (const std::string &streamId)
 Get the nDataStream snoop object corresponding to the name. More...
 
virtual nDataStreamgetStream (const std::string &streamId)
 Get the nDataStream object corresponding to the name. More...
 
virtual std::list< nDataStream * > * getStreams ()
 Obtain a list of the nDataStream objects contained within this group. More...
 
bool isClosed ()
 Returns true if this group has been deleted. More...
 
bool isNested ()
 Flag indicating whether this group is nested within one of more other groups. More...
 
bool isReadOnly ()
 Flag to indicate whether this group is read only. More...
 
virtual void remove (nDataStream *pStream)
 Remove the stream Id from this data group. More...
 
virtual void remove (nDataGroup *pGroup)
 Remove the specified data group from this one. More...
 
virtual void removePublisher (const std::string &subject)
 Remove the specified subject from the list of authorised publishers for this group. More...
 
virtual void removeSnoop (nDataStream *pStream)
 Remove the snoop stream Id from this data group. More...
 
virtual void setReadOnly ()
 Mark the nDataGroup as read only.
 
virtual int size ()
 Return the total number of streams contained in this group. More...
 
- Public Member Functions inherited from com::pcbsys::nirvana::client::nDataStream
virtual const std::string & getSubject ()
 Get the subject associated with the stream. More...
 

Detailed Description

This class represents a individual data group object.

Since
6.0

Member Function Documentation

virtual void com::pcbsys::nirvana::client::nDataGroup::add ( nDataStream pStream)
virtual
void com::pcbsys::nirvana::client::nDataGroup::add ( std::list< nDataStream * > &  streams)
virtual void com::pcbsys::nirvana::client::nDataGroup::add ( nDataGroup pGroup)
virtual

Adds an existing data group to this data group, allowing groups to be cascaded.

Parameters
*pGroup- group to be added
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nDataGroupDeletedException
nDataGroupIsReadOnlyException
nUnexpectedResponseException
virtual void com::pcbsys::nirvana::client::nDataGroup::addListener ( nDataGroupListener pListener)
virtual

Add a new listener to this group so that when Streams or Groups are added or deleted the listener is notified.

Parameters
*pListenerthe listener to receive callbacks on this data group
Exceptions
nDataGroupDeletedException
virtual void com::pcbsys::nirvana::client::nDataGroup::addPublisher ( const std::string &  subject)
virtual

Allow the specified subject to be allowed to publish to this group.

Parameters
subjectthe subject to give permissions to
Exceptions
nDataGroupIsReadOnlyException
nDataGroupDeletedException
nIllegalArgumentException
virtual void com::pcbsys::nirvana::client::nDataGroup::addSnoop ( nDataStream pStream)
virtual
virtual bool com::pcbsys::nirvana::client::nDataGroup::contains ( nDataStream pStream)
virtual

Checks if the stream id exists in this group.

Parameters
*pStreamthe stream to test for
Returns
true if this group contains the specified stream id
Exceptions
nDataGroupDeletedExceptionif this nDataGroup is now closed
virtual bool com::pcbsys::nirvana::client::nDataGroup::contains ( const std::string &  streamId)
virtual

Checks if the snoop stream id exists in this group.

Parameters
streamIdthe name of the stream or group to test for
Returns
true if this group contains the specified stream id
Exceptions
nDataGroupDeletedException
bool com::pcbsys::nirvana::client::nDataGroup::contains ( nDataGroup pGroup)

Checks if the stream id exists in this group.

Parameters
streamthe stream to test for
Returns
true if this group contains the specified stream id
Exceptions
nDataGroupDeletedExceptionif this nDataGroup is now closed
virtual bool com::pcbsys::nirvana::client::nDataGroup::containsSnoop ( nDataStream pStream)
virtual

Checks if the stream id exists in this group.

Parameters
*pStreamthe stream to test for
Returns
true if this group contains the specified stream id
Exceptions
nDataGroupDeletedExceptionif this nDataGroup is now closed
virtual bool com::pcbsys::nirvana::client::nDataGroup::containsSnoop ( const std::string &  streamId)
virtual

Checks if the snoop stream id exists in this group.

Parameters
streamIdthe name of the stream or group to test for
Returns
true if this group contains the specified stream id
Exceptions
nDataGroupDeletedException
nRegisteredEvent* com::pcbsys::nirvana::client::nDataGroup::createRegisteredEvent ( )

Registers a new nRegisteredEvent with the data stream allowing updates only to be sent through to the clients.

Returns
nRegisteredEvent object
Exceptions
nIllegalStateException
See Also
nRegisteredEvent
nConflationAttributes* com::pcbsys::nirvana::client::nDataGroup::getConflationAttributes ( )

Get the conflation attributes for this data group if they exist.

Returns
the conflation attributes if they exist
virtual nDataGroup* com::pcbsys::nirvana::client::nDataGroup::getGroup ( const std::string &  groupName)
virtual

Returns the DataGroup specified, if it is contained within this group.

Parameters
groupNameto find
Returns
nDataGroup the group matching the groupName
Exceptions
nDataGroupDeletedException
int com::pcbsys::nirvana::client::nDataGroup::getGroupCount ( )

Returns the size of the DataGroups (if any) contained within this group.

Returns
int size the number of data groups contained within this group
Exceptions
nDataGroupDeletedException
virtual std::list<nDataGroup*>* com::pcbsys::nirvana::client::nDataGroup::getGroups ( )
virtual

Returns the DataGroups (if any) contained within this group.

Returns
nDataGroup list of the contained data groups
Exceptions
nDataGroupDeletedException
nDataGroup** com::pcbsys::nirvana::client::nDataGroup::getGroupsContaining ( int &  nGroup)

Locate the groups that currently contain this group.

Parameters
nGroup- the number of groups returned
Returns
an array of nDataGroup objects containing the group
virtual longlong com::pcbsys::nirvana::client::nDataGroup::getID ( )
virtual

Return the id of this nDataGroup object.

Returns
the unique long value representing this nDataGroup
virtual const std::string& com::pcbsys::nirvana::client::nDataGroup::getName ( )
virtual

Return the name of the group.

Returns
the name of this Data Group

Reimplemented from com::pcbsys::nirvana::client::nDataStream.

virtual fSortedList<std::string, std::string>& com::pcbsys::nirvana::client::nDataGroup::getPublishers ( )
virtual

Obtain a list of publisher ids.

Returns
an fSortedList of currently allowed publishers
Exceptions
nDataGroupDeletedExceptionif this nDataGroup is now closed
nSession* com::pcbsys::nirvana::client::nDataGroup::getSession ( )

Returns the session associated with this data group instance.

Returns
the session associated with this data group instance
virtual nDataStream* com::pcbsys::nirvana::client::nDataGroup::getSnoopStream ( const std::string &  streamId)
virtual

Get the nDataStream snoop object corresponding to the name.

Parameters
streamIdthe name of the stream
Returns
the stream object
Exceptions
nDataGroupDeletedException
virtual nDataStream* com::pcbsys::nirvana::client::nDataGroup::getStream ( const std::string &  streamId)
virtual

Get the nDataStream object corresponding to the name.

Parameters
streamIdthe name of the stream
Returns
the stream object
Exceptions
nDataGroupDeletedException
virtual std::list<nDataStream*>* com::pcbsys::nirvana::client::nDataGroup::getStreams ( )
virtual

Obtain a list of the nDataStream objects contained within this group.

Returns
a list of known streams
Exceptions
nDataGroupDeletedExceptionif this nDataGroup is now closed
bool com::pcbsys::nirvana::client::nDataGroup::isClosed ( )

Returns true if this group has been deleted.

Returns
true if deleted
bool com::pcbsys::nirvana::client::nDataGroup::isNested ( )

Flag indicating whether this group is nested within one of more other groups.

Returns
true if nested else false
bool com::pcbsys::nirvana::client::nDataGroup::isReadOnly ( )

Flag to indicate whether this group is read only.

If it is, it will be the default Data Group object

Returns
true is default Data Group
virtual void com::pcbsys::nirvana::client::nDataGroup::remove ( nDataStream pStream)
virtual

Remove the stream Id from this data group.

Parameters
*pStream- the stream to remove from this data group
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nDataGroupDeletedException
nDataGroupIsReadOnlyException
nUnexpectedResponseException
virtual void com::pcbsys::nirvana::client::nDataGroup::remove ( nDataGroup pGroup)
virtual
virtual void com::pcbsys::nirvana::client::nDataGroup::removePublisher ( const std::string &  subject)
virtual

Remove the specified subject from the list of authorised publishers for this group.

Parameters
subjectthe subject to remove permissions from
Exceptions
nDataGroupIsReadOnlyException
nDataGroupDeletedException
nIllegalArgumentException
virtual void com::pcbsys::nirvana::client::nDataGroup::removeSnoop ( nDataStream pStream)
virtual

Remove the snoop stream Id from this data group.

Parameters
*pStream- the stream to remove from this data group
Exceptions
nSecurityException
nRequestTimedOutException
nSessionPausedException
nSessionNotConnectedException
nDataGroupDeletedException
nDataGroupIsReadOnlyException
nUnexpectedResponseException
virtual int com::pcbsys::nirvana::client::nDataGroup::size ( )
virtual

Return the total number of streams contained in this group.

Returns
the number of streams in this group
Exceptions
nDataGroupDeletedException