com.pcbsys.nirvana.client.nDataGroup Class Reference

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

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

com.pcbsys.nirvana.client.nDataStream

Public Member Functions

void add (nDataGroup add) throws nSecurityException, nRequestTimedOutException, nSessionPausedException, nSessionNotConnectedException, nDataGroupDeletedException, nDataGroupIsReadOnlyException, nUnexpectedResponseException
 Adds an existing data group to this data group, allowing groups to be cascaded.
void add (nDataStream[] streams) throws nSecurityException, nRequestTimedOutException, nSessionPausedException, nSessionNotConnectedException, nDataGroupDeletedException, nDataGroupIsReadOnlyException, nUnexpectedResponseException
 Add an array of new stream to this data group.
void add (nDataStream stream) throws nSecurityException, nRequestTimedOutException, nSessionPausedException, nSessionNotConnectedException, nDataGroupDeletedException, nDataGroupIsReadOnlyException, nUnexpectedResponseException
 Add a new stream to this data group.
void addListener (nDataGroupListener listener) throws nDataGroupDeletedException
 Add a new listener to this group so that when Streams or Groups are added or deleted the listener is notified.
void addPublisher (String subject) throws Exception
 Allow the specified subject to be allowed to publish to this group.
boolean contains (String streamId) throws nDataGroupDeletedException
 Checks if the stream id exists in this group.
boolean contains (nDataStream stream) throws nDataGroupDeletedException
 Checks if the stream id exists in this group.
nRegisteredEvent createRegisteredEvent () throws nIllegalStateException
 Registers a new nRegisteredEvent with the data stream allowing updates only to be sent through to the clients.
nConflationAttributes getConflationAttributes ()
 Get the conflation attributes for this data group if they exist.
nDataGroup getGroup (String groupName) throws Exception
 Returns the DataGroup specified, if it is contained within this group.
int getGroupCount () throws nDataGroupDeletedException
 Returns the size of the DataGroups (if any) contained within this group.
synchronized Iterator< nDataGroupgetGroups () throws nDataGroupDeletedException
 Returns the DataGroups (if any) contained within this group.
nDataGroup[] getGroupsContaining () throws nDataGroupDeletedException
 Locate the groups that currently contain this group.
long getID ()
 Return the id of this nDataGroup object.
String getName ()
 Return the name of the group.
Iterator< String > getPublishers () throws nDataGroupDeletedException
 Obtain an iterator of publisher ids.
nDataStream getStream (String name) throws nDataGroupDeletedException
 Get the nDataStream object corresponding to the name.
Iterator< nDataStreamgetStreams () throws nDataGroupDeletedException
 Obtain an iterator of the nDataStream objects contained within this group.
boolean isClosed ()
 Returns true if this group has been deleted.
boolean isNested ()
 Flag indicating whether this group is nested within one of more other groups.
boolean isReadOnly ()
 Flag to indicate whether this group is read only.
void remove (nDataGroup group) throws nSecurityException, nRequestTimedOutException, nSessionPausedException, nSessionNotConnectedException, nDataGroupDeletedException, nDataGroupIsReadOnlyException, nUnexpectedResponseException
 Remove the specified data group from this one.
void remove (nDataStream stream) throws nSecurityException, nRequestTimedOutException, nSessionPausedException, nSessionNotConnectedException, nDataGroupDeletedException, nDataGroupIsReadOnlyException, nUnexpectedResponseException
 Remove the stream Id from this data group.
void removePublisher (String subject) throws Exception
 Remove the specified subject from the list of authorised publishers for this group.
int size () throws nDataGroupDeletedException
 Return the total number of streams contained in this group.

Protected Member Functions

void setReadOnly ()
 Mark the nDataGroup as read only.

Detailed Description

This class represents a individual data group object.

Since:
6.0

Member Function Documentation

void com.pcbsys.nirvana.client.nDataGroup.addListener ( nDataGroupListener  listener  )  throws nDataGroupDeletedException

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

Parameters:
listener the listener to receive callbacks on this data group
Exceptions:
nDataGroupDeletedException 

void com.pcbsys.nirvana.client.nDataGroup.addPublisher ( String  subject  )  throws Exception

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

Parameters:
subject the subject to give permissions to
Exceptions:
nDataGroupIsReadOnlyException 
nDataGroupDeletedException 

boolean com.pcbsys.nirvana.client.nDataGroup.contains ( String  streamId  )  throws nDataGroupDeletedException

Checks if the stream id exists in this group.

Parameters:
streamId the name of the stream or group to test for
Returns:
true if this group contains the specified stream id
Exceptions:
nDataGroupDeletedException 

boolean com.pcbsys.nirvana.client.nDataGroup.contains ( nDataStream  stream  )  throws nDataGroupDeletedException

Checks if the stream id exists in this group.

Parameters:
stream the stream to test for
Returns:
true if this group contains the specified stream id
Exceptions:
nDataGroupDeletedException if this nDataGroup is now closed

nRegisteredEvent com.pcbsys.nirvana.client.nDataGroup.createRegisteredEvent (  )  throws nIllegalStateException

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

nDataGroup com.pcbsys.nirvana.client.nDataGroup.getGroup ( String  groupName  )  throws Exception

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

Parameters:
groupName to find
Returns:
nDataGroup the group matching the groupName
Exceptions:
nDataGroupDeletedException 

int com.pcbsys.nirvana.client.nDataGroup.getGroupCount (  )  throws nDataGroupDeletedException

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 

synchronized Iterator<nDataGroup> com.pcbsys.nirvana.client.nDataGroup.getGroups (  )  throws nDataGroupDeletedException

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

Returns:
nDataGroup Iterator of the contained data groups
Exceptions:
nDataGroupDeletedException 

nDataGroup [] com.pcbsys.nirvana.client.nDataGroup.getGroupsContaining (  )  throws nDataGroupDeletedException

Locate the groups that currently contain this group.

Returns:
an array of nDataGroup objects containing the group
Exceptions:
nDataGroupDeletedException if this nDataGroup is now closed

long com.pcbsys.nirvana.client.nDataGroup.getID (  ) 

Return the id of this nDataGroup object.

Returns:
the unique long value representing this nDataGroup

String com.pcbsys.nirvana.client.nDataGroup.getName (  ) 

Return the name of the group.

Returns:
the name of this Data Group

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

Iterator<String> com.pcbsys.nirvana.client.nDataGroup.getPublishers (  )  throws nDataGroupDeletedException

Obtain an iterator of publisher ids.

Returns:
an Iterator of currently allowed publishers
Exceptions:
nDataGroupDeletedException if this nDataGroup is now closed

nDataStream com.pcbsys.nirvana.client.nDataGroup.getStream ( String  name  )  throws nDataGroupDeletedException

Get the nDataStream object corresponding to the name.

Parameters:
name of the stream
Returns:
the stream object
Exceptions:
nDataGroupDeletedException 

Iterator<nDataStream> com.pcbsys.nirvana.client.nDataGroup.getStreams (  )  throws nDataGroupDeletedException

Obtain an iterator of the nDataStream objects contained within this group.

Returns:
an Iterator of known streams
Exceptions:
nDataGroupDeletedException if this nDataGroup is now closed

boolean com.pcbsys.nirvana.client.nDataGroup.isClosed (  ) 

Returns true if this group has been deleted.

Returns:
true if deleted

boolean 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

boolean 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

void com.pcbsys.nirvana.client.nDataGroup.removePublisher ( String  subject  )  throws Exception

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

Parameters:
subject the subject to remove permissions from
Exceptions:
nDataGroupIsReadOnlyException 
nDataGroupDeletedException 

int com.pcbsys.nirvana.client.nDataGroup.size (  )  throws nDataGroupDeletedException

Return the total number of streams contained in this group.

Returns:
the number of streams in this group
Exceptions:
nDataGroupDeletedException