org.resilientedge.jockey.peerbridge
Class PBResponseMarker

java.lang.Object
  |
  +--org.resilientedge.jockey.peerbridge.PBSendMarker
        |
        +--org.resilientedge.jockey.peerbridge.PBResponseMarker
All Implemented Interfaces:
java.io.Serializable

public class PBResponseMarker
extends PBSendMarker

Identifies a response that is being waited on after a request was sent.

Version:
$Revision: 1.1.1.1 $
Author:
John Gardner
See Also:
Serialized Form

Field Summary
static int AWAITING_RESPONSE
          Represents a waiting to receive status
static int HAVE_RESPONSE
          Represents a response received status
static int RECEIVING_RESPONSE
          Represents a response receive in progress status
 
Fields inherited from class org.resilientedge.jockey.peerbridge.PBSendMarker
SEND_COMPLETE, SENDING, SENT_AWAITING_ACK
 
Constructor Summary
PBResponseMarker(PBMessage message, int timeout)
          Construct a fully formed response marker.
 
Method Summary
 PBMessage getResponseMessage()
          Gets the response message
 int getTimeout()
          Gets the number of seconds to wait for a response.
 void setReady(boolean newValue)
          Sets the ready flag
 void setResponseMessage(PBMessage message)
          Sets the response message
 void waitForResponse()
          Blocks until this response is ready.
 
Methods inherited from class org.resilientedge.jockey.peerbridge.PBSendMarker
getMarkerId, getSendMessage, isSendComplete, setMarkerId, setSendComplete, setSendMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AWAITING_RESPONSE

public static final int AWAITING_RESPONSE
Represents a waiting to receive status

RECEIVING_RESPONSE

public static final int RECEIVING_RESPONSE
Represents a response receive in progress status

HAVE_RESPONSE

public static final int HAVE_RESPONSE
Represents a response received status
Constructor Detail

PBResponseMarker

public PBResponseMarker(PBMessage message,
                        int timeout)
Construct a fully formed response marker.
Parameters:
request - the request message
timeout - the timeout value (in sec) for the request
Method Detail

setReady

public void setReady(boolean newValue)
Sets the ready flag
Parameters:
newValue - The new Ready value

setResponseMessage

public void setResponseMessage(PBMessage message)
Sets the response message
Parameters:
message - the response message

getResponseMessage

public PBMessage getResponseMessage()
Gets the response message
Returns:
the response message

getTimeout

public int getTimeout()
Gets the number of seconds to wait for a response.
Returns:
the request timeout

waitForResponse

public void waitForResponse()
Blocks until this response is ready.
Returns:
The Ready value


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.