This class represents the attributes used for channel subscriptions. More...
Public Member Functions | |
nSubscriptionAttributes (string name, string selector, long eid, nEventListener eventCallback) | |
Constructor for setting up the attributes for a subscription to a channel More... | |
Properties | |
virtual nChannel | Channel [get] |
When find and subscribe is successful this will be set to a valid nChannel object | |
virtual string | ChannelName [get] |
The name of the channel | |
virtual long | EID [get] |
The event id that the subscription will start from | |
virtual nBaseClientException | Exception [get] |
If the channel find and subscribe failed, this property will contain an exception indicating the problem, for example, an instance of : nSecurityException, nChannelNotFoundException or nIllegalChannelMode | |
virtual nEventListener | Listener [get] |
The nEventListener associated with this subscription | |
virtual string | Selector [get] |
The selector for event event filtering on this subscription | |
virtual bool | Successful [get] |
Indicates whether the channel has been successfully found and subscribed to | |
This class represents the attributes used for channel subscriptions.
It comprises of the channel name, an optional selector, an initial event id, and the listener that will receive the callback for events consumed.
This object can be used in conjunction with the nSession.subscribe method that accepts an array of nSubscriptionAttributes objects. Once the method returns from the server, the nSubscriptionAttributes objects can be validated, by checking the Successful property.
If Successful the Channel property will be set. If !Successful, the Exception property will be set
com.pcbsys.nirvana.client.nSubscriptionAttributes.nSubscriptionAttributes | ( | string | name, |
string | selector, | ||
long | eid, | ||
nEventListener | eventCallback | ||
) |
Constructor for setting up the attributes for a subscription to a channel
name | the full name of the channel |
selector | an optional selector provided for event filtering |
eid | an initial start event id |
eventCallback | the nEventListener that will receive the callback when events are published |