- com
- pcbsys
- nirvana
- base
- nChannelAttributes
This class is a container for the attributes necessary to create/find a Nirvana channel. More...
Inherits SortedObject, and fExternalable.
Public Member Functions | |
String | getFullName () throws IllegalStateException |
Gets the full name of a channel, including the realm path if set. More... | |
int | getMaxEvents () |
Gets the maximum number of events the channel can contain. More... | |
String | getName () |
Gets the channel name. More... | |
nRealm | getRealm () |
Gets the realm this channel exists within. More... | |
int | getSize () |
Gets the object's size in bytes. More... | |
long | getTTL () |
Gets the Time To Live (TTL) value for each event contained in the channel. More... | |
int | getType () |
Gets the channel type. More... | |
long | getUniqueId () |
Gets the Unique ID value for the channel. More... | |
boolean | isExternal () |
Gets the isExternal flag to find out if the channel is marked as external. More... | |
nChannelAttributes () | |
Default constructor. | |
nChannelAttributes (nChannelAttributes attr) | |
Default constructor. | |
nChannelAttributes (String _name, int _maxEvents, long _ttl, int _type) throws nIllegalArgumentException | |
Constructs a nChannelAttributes object with the values specified. More... | |
nChannelAttributes (String _name, int _maxEvents, long _ttl, int _type, nRealm _realm) throws nIllegalArgumentException | |
Constructs a nChannelAttributes object with the values specified. More... | |
void | readExternal (fEventInputStream ois) throws IOException |
Reads the object from an external Event InputStream. More... | |
void | regenerateUniqueId () |
Generates a new unique ID for this channel. | |
void | setMaxEvents (int value) throws nIllegalArgumentException |
Sets the maximum number of events the channel can contain. More... | |
void | setName (String channelName) throws nIllegalArgumentException |
Set the channel name for this channel attribute object. More... | |
void | setRealm (nRealm _realm) |
Sets the realm the channel exists within, marking the channel as external. More... | |
void | setTTL (long value) throws nIllegalArgumentException |
Sets the Time To Live (TTL) value in milliseconds for each event contained in the channel. More... | |
void | setType (int aType) throws nIllegalArgumentException |
Sets the type of channel. More... | |
void | setUniqueId (long id) |
Sets the Unique ID value for the channel. More... | |
void | writeExternal (fEventOutputStream oos) throws IOException |
Writes the object to an external Event OutputStream. More... | |
This class is a container for the attributes necessary to create/find a Nirvana channel.
com.pcbsys.nirvana.base.nChannelAttributes.nChannelAttributes | ( | String | _name, |
int | _maxEvents, | ||
long | _ttl, | ||
int | _type | ||
) | throws nIllegalArgumentException |
Constructs a nChannelAttributes object with the values specified.
_name | A string specifying the channel name |
_maxEvents | An int specifying the maximum number of events this channel can contain (i.e. the capacity) |
_ttl | A long value specifying the Time To Live (TTL) in milliseconds for events published in this channel (i.e. the age) |
_type | An int specifying the channel type. Valid values are nConstants.CHAN_RELIABLE or nConstants.CHAN_PERSISTIENT |
nException | is thrown if an incorrect parameter is passed to the constructor |
com.pcbsys.nirvana.base.nChannelAttributes.nChannelAttributes | ( | String | _name, |
int | _maxEvents, | ||
long | _ttl, | ||
int | _type, | ||
nRealm | _realm | ||
) | throws nIllegalArgumentException |
Constructs a nChannelAttributes object with the values specified.
_name | A string specifying the channel name |
_maxEvents | An int specifying the maximum number of events this channel can contain (i.e. the capacity) |
_ttl | A long value specifying the Time To Live (TTL) in milliseconds for events published in this channel (i.e. the age) |
_type | An int specifying the channel type. Valid values are nConstants.CHAN_RELIABLE or nConstants.CHAN_PERSISTENT |
_realm | A nRealm object specifying the realm this channel exists within |
nException | is thrown if an incorrect parameter is passed to the constructor |
String com.pcbsys.nirvana.base.nChannelAttributes.getFullName | ( | ) | throws IllegalStateException |
Gets the full name of a channel, including the realm path if set.
nException | is thrown if the name value is not set |
int com.pcbsys.nirvana.base.nChannelAttributes.getMaxEvents | ( | ) |
Gets the maximum number of events the channel can contain.
(i.e. the capacity)
String com.pcbsys.nirvana.base.nChannelAttributes.getName | ( | ) |
Gets the channel name.
nRealm com.pcbsys.nirvana.base.nChannelAttributes.getRealm | ( | ) |
Gets the realm this channel exists within.
nException | is thrown if a realm is not set, i.e. the channel exists within the realm you have a session to and use this object. |
int com.pcbsys.nirvana.base.nChannelAttributes.getSize | ( | ) |
Gets the object's size in bytes.
long com.pcbsys.nirvana.base.nChannelAttributes.getTTL | ( | ) |
Gets the Time To Live (TTL) value for each event contained in the channel.
int com.pcbsys.nirvana.base.nChannelAttributes.getType | ( | ) |
Gets the channel type.
long com.pcbsys.nirvana.base.nChannelAttributes.getUniqueId | ( | ) |
Gets the Unique ID value for the channel.
boolean com.pcbsys.nirvana.base.nChannelAttributes.isExternal | ( | ) |
Gets the isExternal flag to find out if the channel is marked as external.
void com.pcbsys.nirvana.base.nChannelAttributes.readExternal | ( | fEventInputStream | ois | ) | throws IOException |
Reads the object from an external Event InputStream.
ois | An Event InputStream containing the externalised object |
IOException | is thrown if in IO error occurs while reading of the stream |
ClassNotFoundException | is thrown if the stream contains a class that can not be found in the CLASSPATH |
void com.pcbsys.nirvana.base.nChannelAttributes.setMaxEvents | ( | int | value | ) | throws nIllegalArgumentException |
Sets the maximum number of events the channel can contain.
(i.e. the capacity)
value | An int specifying the max number of events |
nException | is thrown if an incorrect value is passed |
void com.pcbsys.nirvana.base.nChannelAttributes.setName | ( | String | channelName | ) | throws nIllegalArgumentException |
Set the channel name for this channel attribute object.
If the channel begins with '/', a realm path is also created and the channel is marked as external.
channelName | A string specifying the name of the channel for this channel attribute object. |
void com.pcbsys.nirvana.base.nChannelAttributes.setRealm | ( | nRealm | _realm | ) |
Sets the realm the channel exists within, marking the channel as external.
If the realm is not set, it is implied that the channel exists within the realm you have a session to and use this object.
_realm | An nRealm object specifying the realm the channel exists within |
void com.pcbsys.nirvana.base.nChannelAttributes.setTTL | ( | long | value | ) | throws nIllegalArgumentException |
Sets the Time To Live (TTL) value in milliseconds for each event contained in the channel.
value | A long specifying the new TTL value in milliseconds |
nException | is thrown if an invalid TTL value is specified |
void com.pcbsys.nirvana.base.nChannelAttributes.setType | ( | int | aType | ) | throws nIllegalArgumentException |
Sets the type of channel.
aType | An int specifying the channel type. Valid values are nConstants.CHAN_RELIABLE or nConstants.CHAN_PERSISTIENT |
nException | is thrown if an illegal channel type is specified |
void com.pcbsys.nirvana.base.nChannelAttributes.setUniqueId | ( | long | id | ) |
Sets the Unique ID value for the channel.
id | A long specifying the new unique id value |
void com.pcbsys.nirvana.base.nChannelAttributes.writeExternal | ( | fEventOutputStream | oos | ) | throws IOException |
Writes the object to an external Event OutputStream.
oos | An event outputstream containing the externalised object |
IOException | is thrown if an IO error occurs while writing to the stream |