com.pcbsys.nirvana.client.nChannelIterator Class Reference

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

Public Member Functions

void close ()
 This method will initiate a close to the server for this Iterator
 
nConsumeEvent getFirst ()
 This returns the first event in the channel or null if there are no events in the channel More...
 
nConsumeEvent getLast ()
 This returns the last event in the channel or null if there are no events in the channel More...
 
nConsumeEvent getNext ()
 Returns the next event in the channel, or will block until an event is published More...
 
nConsumeEvent 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 More...
 
nConsumeEvent getPrev ()
 Gets the previous event in the channel or null if there are no more previous events More...
 

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

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
nSecurityExceptionIf the client does not have the ability to subscribe to the channel
nChannelNotFoundExceptionThe channel is no longer valid
nSessionNotConnectedExceptionThe session has been disconnected
nRequestTimedOutExceptionif the time out for the event to be published is exceeded
nUnexpectedResponseExceptionUnknown response from server. Please contact support
nSessionPausedExceptionThe session is currently paused, please resume
nSelectorParserExceptionInvalid selector specified
nRealmNotFoundExceptionThe 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
nSecurityExceptionIf the client does not have the ability to subscribe to the channel
nChannelNotFoundExceptionThe channel is no longer valid
nSessionNotConnectedExceptionThe session has been disconnected
nRequestTimedOutExceptionif the time out for the event to be published is exceeded
nUnexpectedResponseExceptionUnknown response from server. Please contact support
nSessionPausedExceptionThe session is currently paused, please resume
nSelectorParserExceptionInvalid selector specified
nRealmNotFoundExceptionThe 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
nSecurityExceptionIf the client does not have the ability to subscribe to the channel
nChannelNotFoundExceptionThe channel is no longer valid
nSessionNotConnectedExceptionThe session has been disconnected
nUnexpectedResponseExceptionUnknown response from server. Please contact support
nSessionPausedExceptionThe session is currently paused, please resume
nSelectorParserExceptionInvalid selector specified
nRealmNotFoundExceptionThe 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
timeouttime in milliseconds to wait for the event
Returns
a nConsumeEvent
Exceptions
nSecurityExceptionIf the client does not have the ability to subscribe to the channel
nChannelNotFoundExceptionThe channel is no longer valid
nSessionNotConnectedExceptionThe session has been disconnected
nRequestTimedOutExceptionif the time out for the event to be published is exceeded
nUnexpectedResponseExceptionUnknown response from server. Please contact support
nSessionPausedExceptionThe session is currently paused, please resume
nSelectorParserExceptionInvalid selector specified
nRealmNotFoundExceptionThe 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
nSecurityExceptionIf the client does not have the ability to subscribe to the channel
nChannelNotFoundExceptionThe channel is no longer valid
nSessionNotConnectedExceptionThe session has been disconnected
nRequestTimedOutExceptionif the time out for the event to be published is exceeded
nUnexpectedResponseExceptionUnknown response from server. Please contact support
nSessionPausedExceptionThe session is currently paused, please resume
nSelectorParserExceptionInvalid selector specified
nRealmNotFoundExceptionThe remote realm could not be found