p2ps.endpoint
Class DataMessageEvent

java.lang.Object
  extended byp2ps.endpoint.DataMessageEvent

public class DataMessageEvent
extends java.lang.Object

The event generated when a message is fully received by an endpoint

Version:
$Revision: 295 $
Author:
Ian Wang

Constructor Summary
DataMessageEvent(Endpoint endpoint, DataMessage message)
          Constructs a data message event.
DataMessageEvent(Endpoint endpoint, Endpoint replyendpoint, DataMessage message)
          Constructs a data message event.
 
Method Summary
 DataMessage getDataMessage()
           
 Endpoint getEndpoint()
           
 Endpoint getReplyEndpoint()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataMessageEvent

public DataMessageEvent(Endpoint endpoint,
                        DataMessage message)
Constructs a data message event.

Parameters:
endpoint - the endpoint the data message was received on
message - the message received

DataMessageEvent

public DataMessageEvent(Endpoint endpoint,
                        Endpoint replyendpoint,
                        DataMessage message)
Constructs a data message event.

Parameters:
endpoint - the endpoint the data message was received on
replyendpoint - the endpoint replies through which replies should be sent
message - the message received
Method Detail

getEndpoint

public Endpoint getEndpoint()
Returns:
the endpoint the message was received on

getReplyEndpoint

public Endpoint getReplyEndpoint()
Returns:
the endpoint on which replies to this message should be sent

getDataMessage

public DataMessage getDataMessage()
Returns:
the message received