This class is a container for the attributes necessary to create/find a Nirvana channel.
More...
Inherits fBaseTransportObject, and SortedObject.
Inherited by com.pcbsys.nirvana.base.nChannelAttributeHelper, and com.pcbsys.nirvana.base.nChannelAttributesV4.
|
String | getFullName () throws nBaseClientException |
| 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) throws nIllegalArgumentException |
| 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, ClassNotFoundException |
| Reads the object from an external Event InputStream. More...
|
|
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 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.
- Parameters
-
_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 | An int specifying the Time To Live (TTL) 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 |
- Exceptions
-
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.
- Parameters
-
_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 | An int specifying the Time To Live (TTL) 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 |
- Exceptions
-
nException | is thrown if an incorrect parameter is passed to the constructor |
Gets the full name of a channel, including the realm path if set.
- Returns
- A string specifying the full name of a channel.
- Exceptions
-
int com.pcbsys.nirvana.base.nChannelAttributes.getMaxEvents |
( |
| ) |
|
Gets the maximum number of events the channel can contain.
(i.e. the capacity)
- Returns
- An int specifying the maximum number of events this channel can currently contain (i.e. the current capacity)
String com.pcbsys.nirvana.base.nChannelAttributes.getName |
( |
| ) |
|
Gets the channel name.
- Returns
- A string specifying the name value of the channel
- Exceptions
-
nRealm com.pcbsys.nirvana.base.nChannelAttributes.getRealm |
( |
| ) |
|
Gets the realm this channel exists within.
- Returns
- an nRealm object specifying the realm this channel exists within
- Exceptions
-
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.
- Returns
- An int specifying 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.
- Returns
- A long specifying the current TTL value setting for the channel
int com.pcbsys.nirvana.base.nChannelAttributes.getType |
( |
| ) |
|
Gets the channel type.
- Returns
- An int specifying the channel type. Valid values are nConstants.CHAN_RELIABLE or nConstants.CHAN_PERSISTIENT
long com.pcbsys.nirvana.base.nChannelAttributes.getUniqueId |
( |
| ) |
|
Gets the Unique ID value for the channel.
- Returns
- A long specifying the current 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.
- Returns
- A boolean specifying whether this channel is external or not
void com.pcbsys.nirvana.base.nChannelAttributes.readExternal |
( |
fEventInputStream |
ois | ) |
throws IOException, ClassNotFoundException |
Reads the object from an external Event InputStream.
- Parameters
-
ois | An Event InputStream containing the externalised object |
- Exceptions
-
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 |
Sets the maximum number of events the channel can contain.
(i.e. the capacity)
- Parameters
-
value | An int specifying the max number of events |
- Exceptions
-
nException | is thrown if an incorrect value is passed |
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.
- Parameters
-
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.
- Parameters
-
_realm | An nRealm object specifying the realm the channel exists within |
Sets the Time To Live (TTL) value for each event contained in the channel.
- Parameters
-
value | A long specifying the new TTL value |
- Exceptions
-
nException | is thrown if an invalid TTL value is specified |
Sets the type of channel.
- Parameters
-
- Exceptions
-
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.
- Parameters
-
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.
- Parameters
-
oos | An event outputstream containing the externalised object |
- Exceptions
-
IOException | is thrown if an IO error occurs while writing to the stream |