org.activemq.message
Class ReceiptHolder

java.lang.Object
  extended by org.activemq.message.ReceiptHolder

public class ReceiptHolder
extends Object

ReceiptHolder is a utility class used for waiting for receipts from Packets sent to the broker

Version:
$Revision: 1.1.1.1 $

Field Summary
protected  Object lock
           
protected  boolean notified
           
protected  Receipt receipt
           
 
Constructor Summary
ReceiptHolder()
          Construct a receipt holder
 
Method Summary
 void close()
          close this holder
 Receipt getReceipt()
          Get the Receipt
 Receipt getReceipt(int timeout)
          wait upto timeout timeout ms to get a receipt
 void setReceipt(Receipt r)
          Set the Receipt for this holder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

receipt

protected Receipt receipt

lock

protected Object lock

notified

protected boolean notified
Constructor Detail

ReceiptHolder

public ReceiptHolder()
Construct a receipt holder

Method Detail

setReceipt

public void setReceipt(Receipt r)
Set the Receipt for this holder

Parameters:
r -

getReceipt

public Receipt getReceipt()
Get the Receipt

Returns:
the Receipt or null if it is closed

getReceipt

public Receipt getReceipt(int timeout)
wait upto timeout timeout ms to get a receipt

Parameters:
timeout -
Returns:

close

public void close()
close this holder



Copyright © 2004-2008 Protique, Ltd.. All Rights Reserved.