rice.pastry.wire
Class UdpNodeHandle

java.lang.Object
  |
  +--java.util.Observable
        |
        +--rice.pastry.NodeHandle
              |
              +--rice.pastry.dist.DistNodeHandle
                    |
                    +--rice.pastry.wire.WireNodeHandle
                          |
                          +--rice.pastry.wire.UdpNodeHandle
All Implemented Interfaces:
rice.pastry.LocalNodeI, rice.pastry.messaging.MessageReceiver, rice.p2p.commonapi.NodeHandle, java.util.Observer, rice.pastry.wire.SelectionKeyHandler, java.io.Serializable

public class UdpNodeHandle
extends WireNodeHandle

Node handle that use UDP to transmit messages.

Version:
$Id: UdpNodeHandle.java,v 1.2 2003/09/20 21:35:53 glchen Exp $
Author:
Guanling Chen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class rice.pastry.wire.WireNodeHandle
key, MAX_UDP_MESSAGE_SIZE, PING_THROTTLE, reader, SOCKET_BUFFER_SIZE, state, STATE_USING_TCP, STATE_USING_UDP, STATE_USING_UDP_WAITING_FOR_TCP_DISCONNECT, STATE_USING_UDP_WAITING_TO_DISCONNECT, writer
 
Fields inherited from class rice.pastry.dist.DistNodeHandle
address, alive, isInPool, isLocal, nodeId
 
Fields inherited from class rice.pastry.NodeHandle
DECLARED_DEAD, DECLARED_LIVE, PROXIMITY_CHANGED
 
Fields inherited from class java.util.Observable
 
Fields inherited from interface rice.pastry.LocalNodeI
pending
 
Constructor Summary
UdpNodeHandle(java.net.InetSocketAddress address, rice.pastry.NodeId nid)
           
 
Method Summary
 void receiveMessageImpl(rice.pastry.messaging.Message msg)
          Called to send a message to the node corresponding to this handle.
 
Methods inherited from class rice.pastry.wire.WireNodeHandle
accept, connect, connectToRemoteNode, disconnect, getState, messageSize, pingImpl, pingResponse, pingStarted, read, receiveSocketMessage, sendGreetingResponse, setKey, toStringImpl, wakeup, write
 
Methods inherited from class rice.pastry.dist.DistNodeHandle
addObserver, afterSetLocalNode, clearChanged, countObservers, debug, deleteObserver, deleteObservers, equals, getAddress, getIsInPool, getNodeId, hasChanged, hashCode, isAlive, markAlive, markDead, notifyObservers, notifyObservers, ping, proximity, receiveMessage, setChanged, setIsInPool, setProximity, toString, update
 
Methods inherited from class rice.pastry.NodeHandle
assertLocalNode, getId, getLocalNode, setLocalNode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UdpNodeHandle

public UdpNodeHandle(java.net.InetSocketAddress address,
                     rice.pastry.NodeId nid)
Method Detail

receiveMessageImpl

public void receiveMessageImpl(rice.pastry.messaging.Message msg)
Called to send a message to the node corresponding to this handle.

Overrides:
receiveMessageImpl in class WireNodeHandle
Parameters:
msg - Message to be delivered, may or may not be routeMessage.