org.mpisws.p2p.transport.wire
Class UDPLayerImpl
java.lang.Object
rice.selector.SelectionKeyHandler
org.mpisws.p2p.transport.wire.UDPLayerImpl
- All Implemented Interfaces:
- UDPLayer, Destructable
public class UDPLayerImpl
- extends SelectionKeyHandler
- implements UDPLayer
Method Summary |
void |
acceptMessages(boolean b)
|
void |
destroy()
|
void |
modifyKey(java.nio.channels.SelectionKey key)
DESCRIBE THE METHOD |
protected void |
openServerSocket()
|
void |
read(java.nio.channels.SelectionKey key)
DESCRIBE THE METHOD |
protected void |
readHeader(java.net.InetSocketAddress address)
|
MessageRequestHandle<java.net.InetSocketAddress,java.nio.ByteBuffer> |
sendMessage(java.net.InetSocketAddress destination,
java.nio.ByteBuffer msg,
MessageCallback<java.net.InetSocketAddress,java.nio.ByteBuffer> deliverAckToMe,
java.util.Map<java.lang.String,java.lang.Object> options)
The ack is not the end to end, it's called when actually sent |
void |
write(java.nio.channels.SelectionKey key)
DESCRIBE THE METHOD |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPTIONS
public static final java.util.Map<java.lang.String,java.lang.Object> OPTIONS
DATAGRAM_RECEIVE_BUFFER_SIZE
public int DATAGRAM_RECEIVE_BUFFER_SIZE
DATAGRAM_SEND_BUFFER_SIZE
public int DATAGRAM_SEND_BUFFER_SIZE
UDPLayerImpl
public UDPLayerImpl(WireTransportLayerImpl wire)
throws java.io.IOException
- Throws:
java.io.IOException
sendMessage
public MessageRequestHandle<java.net.InetSocketAddress,java.nio.ByteBuffer> sendMessage(java.net.InetSocketAddress destination,
java.nio.ByteBuffer msg,
MessageCallback<java.net.InetSocketAddress,java.nio.ByteBuffer> deliverAckToMe,
java.util.Map<java.lang.String,java.lang.Object> options)
- The ack is not the end to end, it's called when actually sent
- Specified by:
sendMessage
in interface UDPLayer
- Parameters:
destination
- m
- deliverAckToMe
- ack is when the message is sent to the wire
openServerSocket
protected void openServerSocket()
throws java.io.IOException
- Throws:
java.io.IOException
read
public void read(java.nio.channels.SelectionKey key)
- DESCRIBE THE METHOD
- Overrides:
read
in class SelectionKeyHandler
- Parameters:
key
- DESCRIBE THE PARAMETER
readHeader
protected void readHeader(java.net.InetSocketAddress address)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(java.nio.channels.SelectionKey key)
- DESCRIBE THE METHOD
- Overrides:
write
in class SelectionKeyHandler
- Parameters:
key
- DESCRIBE THE PARAMETER
modifyKey
public void modifyKey(java.nio.channels.SelectionKey key)
- DESCRIBE THE METHOD
- Overrides:
modifyKey
in class SelectionKeyHandler
- Parameters:
key
- DESCRIBE THE PARAMETER
destroy
public void destroy()
- Specified by:
destroy
in interface Destructable
acceptMessages
public void acceptMessages(boolean b)
- Specified by:
acceptMessages
in interface UDPLayer
Copyright © 2001-2005 - Rice Pastry.