org.mpisws.p2p.transport.wire
Class UDPLayerImpl.Envelope

java.lang.Object
  extended by org.mpisws.p2p.transport.wire.UDPLayerImpl.Envelope
All Implemented Interfaces:
MessageRequestHandle<InetSocketAddress,ByteBuffer>, Cancellable
Enclosing class:
UDPLayerImpl

public class UDPLayerImpl.Envelope
extends Object
implements MessageRequestHandle<InetSocketAddress,ByteBuffer>

Internal class which holds a pending datagram

Author:
amislove

Field Summary
protected  MessageCallback<InetSocketAddress,ByteBuffer> continuation
           
protected  InetSocketAddress destination
           
protected  ByteBuffer msg
          The message sans header.
 
Constructor Summary
UDPLayerImpl.Envelope(InetSocketAddress destination, ByteBuffer msg, MessageCallback<InetSocketAddress,ByteBuffer> deliverAckToMe, Map<String,Object> options)
          Constructor for Envelope.
 
Method Summary
 boolean cancel()
           
 InetSocketAddress getIdentifier()
           
 ByteBuffer getMessage()
           
 Map<String,Object> getOptions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

destination

protected InetSocketAddress destination

msg

protected ByteBuffer msg
The message sans header.


continuation

protected MessageCallback<InetSocketAddress,ByteBuffer> continuation
Constructor Detail

UDPLayerImpl.Envelope

public UDPLayerImpl.Envelope(InetSocketAddress destination,
                             ByteBuffer msg,
                             MessageCallback<InetSocketAddress,ByteBuffer> deliverAckToMe,
                             Map<String,Object> options)
Constructor for Envelope.

Parameters:
adr - DESCRIBE THE PARAMETER
m - DESCRIBE THE PARAMETER
Method Detail

cancel

public boolean cancel()
Specified by:
cancel in interface Cancellable
Returns:
true if it was cancelled, false if it was already complete, or cancelled.

getIdentifier

public InetSocketAddress getIdentifier()
Specified by:
getIdentifier in interface MessageRequestHandle<InetSocketAddress,ByteBuffer>

getMessage

public ByteBuffer getMessage()
Specified by:
getMessage in interface MessageRequestHandle<InetSocketAddress,ByteBuffer>

getOptions

public Map<String,Object> getOptions()
Specified by:
getOptions in interface MessageRequestHandle<InetSocketAddress,ByteBuffer>


Copyright © 2010. All Rights Reserved.