com.pcbsys.nirvana.client.nChannelIterator Class Reference

This class iterates synchronously over a Nirvana Realm channel. More...

#include <nChannelIterator.h>


Public Member Functions

void close ()
 This method will initiate a close to the server for this Iterator.
nConsumeEventgetFirst ()
 This returns the first event in the channel or null if there are no events in the channel.
nConsumeEventgetLast ()
 This returns the last event in the channel or null if there are no events in the channel.
nConsumeEventgetNext (long timeout)
 Returns the next event in the channel, or if none will block for the time in milliseconds for the next event to be published onto the channel.
nConsumeEventgetNext ()
 Returns the next event in the channel, or will block until an event is published.
nConsumeEventgetPrev ()
 Gets the previous event in the channel or null if there are no more previous events.

Detailed Description

This class iterates synchronously over a Nirvana Realm channel.

By using the methods the channel can be traversed forwards/backwards


Member Function Documentation

void com.pcbsys.nirvana.client.nChannelIterator.close (  ) 

This method will initiate a close to the server for this Iterator.

Since:
4.0

nConsumeEvent* com.pcbsys.nirvana.client.nChannelIterator.getFirst (  ) 

This returns the first event in the channel or null if there are no events in the channel.

Returns:
a nConsumeEvent or null
Exceptions:
nSecurityException If the client does not have the ability to subscribe to the channel
nChannelNotFoundException The channel is no longer valid
nSessionNotConnectedException The session has been disconnected
nRequestTimedOutException if the time out for the event to be published is exceeded
nUnexpectedResponseException Unknown response from server. Please contact support
nSessionPausedException The session is currently paused, please resume
nSelectorParserException Invalid selector specified
nRealmNotFoundException The remote realm could not be found

nConsumeEvent* com.pcbsys.nirvana.client.nChannelIterator.getLast (  ) 

This returns the last event in the channel or null if there are no events in the channel.

Returns:
a nConsumeEvent or null
Exceptions:
nSecurityException If the client does not have the ability to subscribe to the channel
nChannelNotFoundException The channel is no longer valid
nSessionNotConnectedException The session has been disconnected
nRequestTimedOutException if the time out for the event to be published is exceeded
nUnexpectedResponseException Unknown response from server. Please contact support
nSessionPausedException The session is currently paused, please resume
nSelectorParserException Invalid selector specified
nRealmNotFoundException The remote realm could not be found

nConsumeEvent* com.pcbsys.nirvana.client.nChannelIterator.getNext ( long  timeout  ) 

Returns the next event in the channel, or if none will block for the time in milliseconds for the next event to be published onto the channel.

Parameters:
timeout time in milliseconds to wait for the event
Returns:
a nConsumeEvent
Exceptions:
nSecurityException If the client does not have the ability to subscribe to the channel
nChannelNotFoundException The channel is no longer valid
nSessionNotConnectedException The session has been disconnected
nRequestTimedOutException if the time out for the event to be published is exceeded
nUnexpectedResponseException Unknown response from server. Please contact support
nSessionPausedException The session is currently paused, please resume
nSelectorParserException Invalid selector specified
nRealmNotFoundException The remote realm could not be found

nConsumeEvent* com.pcbsys.nirvana.client.nChannelIterator.getNext (  ) 

Returns the next event in the channel, or will block until an event is published.

Returns:
a nConsumeEvent
Exceptions:
nSecurityException If the client does not have the ability to subscribe to the channel
nChannelNotFoundException The channel is no longer valid
nSessionNotConnectedException The session has been disconnected
nUnexpectedResponseException Unknown response from server. Please contact support
nSessionPausedException The session is currently paused, please resume
nSelectorParserException Invalid selector specified
nRealmNotFoundException The remote realm could not be found

nConsumeEvent* com.pcbsys.nirvana.client.nChannelIterator.getPrev (  ) 

Gets the previous event in the channel or null if there are no more previous events.

Returns:
a nConsumeEvent or null
Exceptions:
nSecurityException If the client does not have the ability to subscribe to the channel
nChannelNotFoundException The channel is no longer valid
nSessionNotConnectedException The session has been disconnected
nRequestTimedOutException if the time out for the event to be published is exceeded
nUnexpectedResponseException Unknown response from server. Please contact support
nSessionPausedException The session is currently paused, please resume
nSelectorParserException Invalid selector specified
nRealmNotFoundException The remote realm could not be found