org.planx.xmlstore.routing.operation
Class OriginReceiver
java.lang.Object
org.planx.xmlstore.routing.operation.OriginReceiver
- All Implemented Interfaces:
- Receiver
- Direct Known Subclasses:
- ConnectReceiver, DataLookupReceiver, HashReceiver, HashRequestReceiver, NodeLookupReceiver, RemoveReceiver, StoreReceiver, StoreRequestReceiver
public abstract class OriginReceiver
- extends Object
- implements Receiver
Handles updating of the local space when messages are received and provides
easy implementation of more specific receivers.
|
Method Summary |
void |
receive(Message incoming,
int comm)
Updates the local space by inserting the origin node. |
void |
timeout(int comm)
Does nothing, can be overridden by subclasses to change timeout functionality. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
server
protected MessageServer server
local
protected Node local
space
protected Space space
OriginReceiver
public OriginReceiver(MessageServer server,
Node local,
Space space)
receive
public void receive(Message incoming,
int comm)
throws IOException
- Updates the local space by inserting the origin node. Note that if the
node already exists in the local space, it's time last seen is updated
instead.
- Specified by:
receive in interface Receiver
- Throws:
IOException - if an I/O error occurs
timeout
public void timeout(int comm)
throws IOException
- Does nothing, can be overridden by subclasses to change timeout functionality.
- Specified by:
timeout in interface Receiver
- Throws:
IOException - if an I/O error occurs
Copyright © 2010. All Rights Reserved.