com.pcbsys.nirvana.nJMS.MessageConsumerImpl Class Reference

<Enter Class Description> More...

Inheritance diagram for com.pcbsys.nirvana.nJMS.MessageConsumerImpl:
com.pcbsys.nirvana.client.nEventListener com.pcbsys.nirvana.nJMS.QueueReceiverImpl com.pcbsys.nirvana.nJMS.TopicSubscriberImpl

Public Member Functions

void close () throws javax.jms.JMSException
 <Enter Method Description> More...
 
javax.jms.MessageListener getMessageListener () throws javax.jms.JMSException
 <Enter Method Description> More...
 
String getMessageSelector () throws javax.jms.JMSException
 <Enter Method Description> More...
 
void go (nConsumeEvent evt)
 <Enter Method Description> More...
 
 MessageConsumerImpl (SessionImpl session)
 <Enter Constructor Description>
 
javax.jms.Message receive (long timeOut) throws javax.jms.JMSException
 This method will block until Message is received or the specified timeout expires. More...
 
javax.jms.Message receive () throws javax.jms.JMSException
 This method will block until Message is received. More...
 
int receiveCacheReturnOutstandingRequests (List< Message > listToPopulateCache) throws JMSException
 This method will return the number of outstanding receive client requests, sent to the server, while also filling up the provided list with all the client-side cached events. More...
 
List< javax.jms.Message > receiveMessages (int prefetchSize) throws javax.jms.JMSException
 This method will block until list of messages is received. More...
 
List< javax.jms.Message > receiveMessages (long timeOut, int prefetchSize) throws javax.jms.JMSException
 This method will block until list of messages is received or the specified timeout expires. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.client.nEventListener
void go (com.pcbsys.nirvana.client.nConsumeEvent evt)
 This method is asynchronously called by the nirvana client API to deliver an event to a registered subscriber. More...
 

Protected Member Functions

void resetMessageListener () throws javax.jms.JMSException
 <Enter Method Description> Clean's up the MessageConsumer resources More...
 

Detailed Description

<Enter Class Description>

Member Function Documentation

void com.pcbsys.nirvana.nJMS.MessageConsumerImpl.close ( ) throws javax.jms.JMSException

<Enter Method Description>

Exceptions
JMSException<Enter Exception Description>
javax.jms.MessageListener com.pcbsys.nirvana.nJMS.MessageConsumerImpl.getMessageListener ( ) throws javax.jms.JMSException

<Enter Method Description>

Returns
<Enter Result Description>
Exceptions
JMSException<Enter Exception Description>
String com.pcbsys.nirvana.nJMS.MessageConsumerImpl.getMessageSelector ( ) throws javax.jms.JMSException

<Enter Method Description>

Returns
<Enter Result Description>
Exceptions
JMSException<Enter Exception Description>
void com.pcbsys.nirvana.nJMS.MessageConsumerImpl.go ( nConsumeEvent  evt)

<Enter Method Description>

Parameters
evt<Enter Parameter Description>
javax.jms.Message com.pcbsys.nirvana.nJMS.MessageConsumerImpl.receive ( long  timeOut) throws javax.jms.JMSException

This method will block until Message is received or the specified timeout expires.

Parameters
timeOutTime to wait in milliseconds for an event
Returns
Recived message or null
Exceptions
JMSException<Enter Exception Description>
javax.jms.Message com.pcbsys.nirvana.nJMS.MessageConsumerImpl.receive ( ) throws javax.jms.JMSException

This method will block until Message is received.

Returns
Recived message or null
Exceptions
JMSException<Enter Exception Description>
int com.pcbsys.nirvana.nJMS.MessageConsumerImpl.receiveCacheReturnOutstandingRequests ( List< Message >  listToPopulateCache) throws JMSException

This method will return the number of outstanding receive client requests, sent to the server, while also filling up the provided list with all the client-side cached events.

If the provided list is null, no cached events will be extracted. The outstanding requests value is only relevant in horizontal scalability landscape. When sync consumer tries to get an event, if there are none cached, then an iterate/pop request is sent to all of the nodes in the HS landscape. Outstanding are those requests, for which the client is still waiting for the response.

Parameters
listToPopulateCachethe list, which will be filled up with all the cached events. Will be cleared before use.
Returns
number of outstanding queue pop / channel iterate client requests
Exceptions
JMSExceptionif the consumer is closed or if an event is received, that is not convertible to a JMS Message. If the consumer is closed, the exception will be instance of javax.jms.IllegalStateException.
List<javax.jms.Message> com.pcbsys.nirvana.nJMS.MessageConsumerImpl.receiveMessages ( int  prefetchSize) throws javax.jms.JMSException

This method will block until list of messages is received.

Parameters
prefetchSizethe number of events to get, if there are not enough events on server, will return all avalible events
Returns
The list of events or null
Exceptions
JMSException<Enter Exception Description>
Since
10.7
List<javax.jms.Message> com.pcbsys.nirvana.nJMS.MessageConsumerImpl.receiveMessages ( long  timeOut,
int  prefetchSize 
) throws javax.jms.JMSException

This method will block until list of messages is received or the specified timeout expires.

Parameters
prefetchSizethe number of events to get, if there are not enough events on server, will return all avalible events
Returns
The list of events or null
Exceptions
JMSException<Enter Exception Description>
Since
10.7
void com.pcbsys.nirvana.nJMS.MessageConsumerImpl.resetMessageListener ( ) throws javax.jms.JMSException
protected

<Enter Method Description> Clean's up the MessageConsumer resources

Exceptions
JMSException<Enter Exception Description>