org.planx.xmlstore.routing.messaging
Interface Receiver

All Known Implementing Classes:
ConnectOperation, ConnectReceiver, DataLookupOperation, DataLookupReceiver, HashReceiver, HashRequestReceiver, NodeLookupOperation, NodeLookupReceiver, OriginReceiver, RemoveReceiver, StoreReceiver, StoreRequestReceiver

public interface Receiver

A Receiver waits for incoming messages and performs some action if various events occur.


Method Summary
 void receive(Message incoming, int comm)
          Message is received with communication identifier comm.
 void timeout(int comm)
          No reply received in MessageServer.TIMEOUT seconds for the message with communication id comm.
 

Method Detail

receive

void receive(Message incoming,
             int comm)
             throws IOException,
                    UnknownMessageException
Message is received with communication identifier comm. The Receiver should use this value when sending replies using MessageServer.reply(int, org.planx.xmlstore.routing.messaging.Message, java.net.InetAddress, int).

Throws:
IOException - if an I/O error occurs
UnknownMessageException - if the message or comm was unexpected

timeout

void timeout(int comm)
             throws IOException,
                    UnknownMessageException
No reply received in MessageServer.TIMEOUT seconds for the message with communication id comm.

Throws:
IOException - if an I/O error occurs
UnknownMessageException - if the comm was unexpected


Copyright © 2010. All Rights Reserved.