org.objectweb.joram.mom.notifications.ReceiveRequest Class Reference

Inherits org.objectweb.joram.mom.notifications.AbstractRequest.

Inheritance diagram for org.objectweb.joram.mom.notifications.ReceiveRequest:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.joram.mom.notifications.ReceiveRequest:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ReceiveRequest (int clientContext, int requestId, String selector, long timeOut, boolean autoAck, String[] msgIds, int msgCount)
String getSelector ()
long getTimeOut ()
boolean getAutoAck ()
final String[] getMessageIds ()
void setExpiration (long startTime)
boolean isValid (long currentTime)
final int getMessageCount ()

Public Attributes

fr.dyade.aaa.agent.AgentId requester

Detailed Description

A ReceiveRequest instance is used by a client agent for requesting a message on a queue.

Definition at line 30 of file ReceiveRequest.java.


Constructor & Destructor Documentation

org.objectweb.joram.mom.notifications.ReceiveRequest.ReceiveRequest ( int  clientContext,
int  requestId,
String  selector,
long  timeOut,
boolean  autoAck,
String[]  msgIds,
int  msgCount 
)

Constructs a ReceiveRequest instance.

Parameters:
clientContext Identifies a client context.
requestId Request identifier.
selector Selector expression for filtering messages, null or empty for no selection.
timeOut Time-to-live value. For immediate delivery, should be set to 0. For infinite time-to-live, should be negative.
autoAck true for immediately acknowledging the delivered message on the queue, false otherwise.

Definition at line 73 of file ReceiveRequest.java.


Member Function Documentation

String org.objectweb.joram.mom.notifications.ReceiveRequest.getSelector (  ) 

Returns the selector of the request.

Definition at line 90 of file ReceiveRequest.java.

Referenced by org.objectweb.joram.mom.dest.QueueImpl.deliverMessages().

long org.objectweb.joram.mom.notifications.ReceiveRequest.getTimeOut (  ) 

Returns the time-to-live parameter of this request, in milliseconds (0 for immediate delivery, negative for infinite validity).

Definition at line 98 of file ReceiveRequest.java.

boolean org.objectweb.joram.mom.notifications.ReceiveRequest.getAutoAck (  ) 

Checks the autoAck mode of this request.

Definition at line 103 of file ReceiveRequest.java.

Referenced by org.objectweb.joram.mom.dest.QueueImpl.deliverMessages().

void org.objectweb.joram.mom.notifications.ReceiveRequest.setExpiration ( long  startTime  ) 

Updates the expiration time field, if needed. This method calculate the expiration time of the request from the current time (1st argument) and the timeout attribute.

Parameters:
startTime The starting time to calculate the expiration time.

Reimplemented from fr.dyade.aaa.agent.Notification.

Definition at line 118 of file ReceiveRequest.java.

boolean org.objectweb.joram.mom.notifications.ReceiveRequest.isValid ( long  currentTime  ) 

Returns false if the request expired.

Parameters:
currentTime The current time to verify the expiration time.

Definition at line 128 of file ReceiveRequest.java.


Member Data Documentation

fr.dyade.aaa.agent.AgentId org.objectweb.joram.mom.notifications.ReceiveRequest.requester

Identifier of the client requesting a message, set by the queue if storing the request.

Definition at line 55 of file ReceiveRequest.java.

Referenced by org.objectweb.joram.mom.dest.QueueImpl.deliverMessages(), org.objectweb.joram.mom.dest.QueueImpl.doDeleteNot(), and org.objectweb.joram.mom.dest.QueueImpl.doRightRequest().


The documentation for this class was generated from the following file:
Generated on Tue Sep 16 16:20:08 2008 for joram by  doxygen 1.5.0