org.jboss.jms.util
Class RendezVous

java.lang.Object
  extended byorg.jboss.jms.util.RendezVous

public class RendezVous
extends java.lang.Object

Version:
$Revision: 403 $
Author:
Ovidiu Feodorov

Field Summary
static Logger log
           
 
Constructor Summary
RendezVous()
           
 
Method Summary
 java.lang.Object get(long timeout)
          This method is used by the receiver thread, which registers with the redezvous and blocks until an object becomes available.
 boolean isOccupied()
           
 boolean put(java.lang.Object o)
          Method used by the sender thread, that only puts the object IF there is a receiver thread waiting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final Logger log
Constructor Detail

RendezVous

public RendezVous()
Method Detail

get

public java.lang.Object get(long timeout)
This method is used by the receiver thread, which registers with the redezvous and blocks until an object becomes available. Only one thread can be waiting, if the method is called by other threads while one is waiting, will throw unchecked exception.

Parameters:
timeout - - the timeout value in milliseconds. A zero timeout never expires, and the call blocks indefinitely.
Returns:
the object or null if the timeout expires and no Object was put.

put

public boolean put(java.lang.Object o)
Method used by the sender thread, that only puts the object IF there is a receiver thread waiting.

Returns:
true if the object was transferred to the receiver thread, or false if there is no receiver thread waiting.

isOccupied

public boolean isOccupied()


Copyright © 2006 JBoss Inc. All Rights Reserved.