net.i2p.router
Class ClientMessage

java.lang.Object
  extended by net.i2p.router.ClientMessage

public class ClientMessage
extends java.lang.Object

Wrap a message either destined for a local client or received from one.

Author:
jrandom

Constructor Summary
ClientMessage()
           
 
Method Summary
 Destination getDestination()
          Retrieve the destination to which this message is directed.
 Hash getDestinationHash()
          Retrieve the destination to which this message is directed.
 long getExpiration()
          Expiration requested by the client that sent the message.
 Destination getFromDestination()
           
 MessageId getMessageId()
           
 Payload getPayload()
          Retrieve the payload of the message.
 MessageReceptionInfo getReceptionInfo()
          Retrieve the information regarding how the router received this message.
 SessionConfig getSenderConfig()
          Retrieve the session config of the client that sent the message.
 void setDestination(Destination dest)
           
 void setDestinationHash(Hash dest)
           
 void setExpiration(long e)
           
 void setFromDestination(Destination dest)
           
 void setMessageId(MessageId id)
           
 void setPayload(Payload payload)
           
 void setReceptionInfo(MessageReceptionInfo info)
           
 void setSenderConfig(SessionConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientMessage

public ClientMessage()
Method Detail

getPayload

public Payload getPayload()
Retrieve the payload of the message. All ClientMessage objects should have a payload


setPayload

public void setPayload(Payload payload)

getDestination

public Destination getDestination()
Retrieve the destination to which this message is directed. All ClientMessage objects should have a destination.


setDestination

public void setDestination(Destination dest)

getFromDestination

public Destination getFromDestination()

setFromDestination

public void setFromDestination(Destination dest)

getDestinationHash

public Hash getDestinationHash()
Retrieve the destination to which this message is directed. All ClientMessage objects should have a destination.


setDestinationHash

public void setDestinationHash(Hash dest)

getMessageId

public MessageId getMessageId()

setMessageId

public void setMessageId(MessageId id)

getReceptionInfo

public MessageReceptionInfo getReceptionInfo()
Retrieve the information regarding how the router received this message. Only messages received from the network will have this information, not locally originated ones.


setReceptionInfo

public void setReceptionInfo(MessageReceptionInfo info)

getSenderConfig

public SessionConfig getSenderConfig()
Retrieve the session config of the client that sent the message. This will only be available if the client was local


setSenderConfig

public void setSenderConfig(SessionConfig config)

getExpiration

public long getExpiration()
Expiration requested by the client that sent the message. This will only be available for locally originated messages.


setExpiration

public void setExpiration(long e)