com.pcbsys.nirvana.base.nDataGroup Class Reference

This class represents a Data Group offering the related services Any event written to a Data Group will be propagated to all Data Streams that are members of that Data Group. More...

Inheritance diagram for com.pcbsys.nirvana.base.nDataGroup:
com.pcbsys.nirvana.base.nDataStream

Public Member Functions

void addSnoopStream (nDataStream sub) throws Exception
 Adds a Data Stream to the Data Group Snoop Streams. More...
 
void addStream (nDataStream sub) throws Exception
 Adds a Data Stream to the Data Group. More...
 
void close ()
 Closes the Data Group.
 
nDataStream delSnoopStream (String name)
 Remove a Data Stream from the Data Group Snoop Streams. More...
 
nDataStream delStream (String name)
 Remove a Data Stream from the Data Group. More...
 
nDataStream get (String name)
 Find a data stream or group in this data group. More...
 
nDataStream[] getAllStreams ()
 Get all Stream for this Data Group. More...
 
long getID ()
 Get the Data Group ID. More...
 
nDataStream[] getParent ()
 Gets the list of parent Data Streams. More...
 
nDataStream getSnoop (String name)
 Find a data stream or group in this data group's snoop streams. More...
 
 nDataGroup ()
 Default constructor.
 
void removeParent (nDataGroup group)
 Remove a Data Group from the list of parent groups. More...
 
void setParent (nDataGroup group)
 Adds a parent Data Group. More...
 
Iterator< nDataStreamsnoopValues ()
 Returns an iterators of this data group's snoop streams. More...
 
int totalChildren ()
 Get the total number of child Data Streams. More...
 
Iterator< nDataStreamvalues ()
 Returns an iterator of this data group's data streams. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.base.nDataStream
void close ()
 Closes the Data Stream.
 
boolean isSnoop ()
 Returns whether this is a snoop stream or not. More...
 
 nDataStream ()
 Default Constructor.
 
 nDataStream (String name, String subject)
 Parametrized constructor. More...
 
 nDataStream (String name, String subject, String realm)
 Parametrized constructor. More...
 
 nDataStream (nDataStream stream)
 Copy Constructor. More...
 
void setSnoop (boolean snoop)
 Sets whether this is a snoop stream or not. More...
 

Detailed Description

This class represents a Data Group offering the related services Any event written to a Data Group will be propagated to all Data Streams that are members of that Data Group.

Data Groups may also contain other Data Groups. Any event written to an upper level Data Group will be written to all contained Data Groups, and thus to all contained Data Streams. Note that all Data Streams are automatically added to the realm server's Default Data Group. Writing an event to the Default Data Group, therefore, will ensure it is delivered to any client with a session configured to use a Data Stream.

Member Function Documentation

void com.pcbsys.nirvana.base.nDataGroup.addSnoopStream ( nDataStream  sub) throws Exception

Adds a Data Stream to the Data Group Snoop Streams.

Parameters
subthe Data Stream to be added to the Data Group Snoop Streams
void com.pcbsys.nirvana.base.nDataGroup.addStream ( nDataStream  sub) throws Exception

Adds a Data Stream to the Data Group.

Parameters
subthe Data Stream to be added to the Data Group
nDataStream com.pcbsys.nirvana.base.nDataGroup.delSnoopStream ( String  name)

Remove a Data Stream from the Data Group Snoop Streams.

Parameters
nameThe name of the stream to be deleted
Returns
the Data Stream that was removed or null if the stream was not removed
nDataStream com.pcbsys.nirvana.base.nDataGroup.delStream ( String  name)

Remove a Data Stream from the Data Group.

Parameters
nameThe name of the stream to be deleted
Returns
the Data Stream that was removed or null if the stream was not removed
nDataStream com.pcbsys.nirvana.base.nDataGroup.get ( String  name)

Find a data stream or group in this data group.

Parameters
namethe name of the stream to be looked up
Returns
the data stream or group found in this data group or null if not found
nDataStream [] com.pcbsys.nirvana.base.nDataGroup.getAllStreams ( )

Get all Stream for this Data Group.

Returns
an array containing all Data Streams included in this Data Group
long com.pcbsys.nirvana.base.nDataGroup.getID ( )

Get the Data Group ID.

Returns
the data group ID
nDataStream [] com.pcbsys.nirvana.base.nDataGroup.getParent ( )

Gets the list of parent Data Streams.

Returns
an array containing the parent data streams
nDataStream com.pcbsys.nirvana.base.nDataGroup.getSnoop ( String  name)

Find a data stream or group in this data group's snoop streams.

Parameters
namethe name of the stream to be looked up
Returns
the data stream or group found in this data group or null if not found
void com.pcbsys.nirvana.base.nDataGroup.removeParent ( nDataGroup  group)

Remove a Data Group from the list of parent groups.

Parameters
groupthe Data Group to be removed
void com.pcbsys.nirvana.base.nDataGroup.setParent ( nDataGroup  group)

Adds a parent Data Group.

Parameters
groupthe Data Group to be added as a parent
Iterator<nDataStream> com.pcbsys.nirvana.base.nDataGroup.snoopValues ( )

Returns an iterators of this data group's snoop streams.

Returns
and iterator of data streams
int com.pcbsys.nirvana.base.nDataGroup.totalChildren ( )

Get the total number of child Data Streams.

Returns
the total number of child Data Streams
Iterator<nDataStream> com.pcbsys.nirvana.base.nDataGroup.values ( )

Returns an iterator of this data group's data streams.

Returns
and iterator of data streams