org.objectweb.joram.mom.notifications
Class ReceiveRequest
- Cloneable, Serializable
public class ReceiveRequest
A ReceiveRequest
instance is used by a client agent for
requesting a message on a queue.
AgentId | requester - Identifier of the client requesting a message, set by the queue if
storing the request.
|
ReceiveRequest(int clientContext, int requestId, String selector, long timeOut, boolean autoAck) - Constructs a
ReceiveRequest instance.
|
boolean | getAutoAck() - Checks the autoAck mode of this request.
|
String | getSelector() - Returns the selector of the request.
|
long | getTimeOut() - Returns the time-to-live parameter of this request, in milliseconds (0 for
immediate delivery, negative for infinite validity).
|
boolean | isValid() - Returns
false if the request expired.
|
void | setExpiration(long currentTime) - Updates the expiration time field, if needed.
|
requester
public AgentId requester
Identifier of the client requesting a message, set by the queue if
storing the request.
ReceiveRequest
public ReceiveRequest(int clientContext,
int requestId,
String selector,
long timeOut,
boolean autoAck)
Constructs a ReceiveRequest
instance.
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.
getAutoAck
public boolean getAutoAck()
Checks the autoAck mode of this request.
getSelector
public String getSelector()
Returns the selector of the request.
getTimeOut
public long getTimeOut()
Returns the time-to-live parameter of this request, in milliseconds (0 for
immediate delivery, negative for infinite validity).
isValid
public boolean isValid()
Returns false
if the request expired.
setExpiration
public void setExpiration(long currentTime)
Updates the expiration time field, if needed.
Copyright B) 2004 Scalagent - All rights reserved