org.mpisws.p2p.transport.rendezvous
Interface ResponseStrategy<Identifier>

Type Parameters:
Identifier -
All Known Implementing Classes:
NeverResponseStrategy, TimeoutResponseStrategy

public interface ResponseStrategy<Identifier>

Used on non-Firewalled nodes to predict if a firewalled node will accept a message. For example, the firewalled node pinged the local node, now can the local node respond? In most firewalls, the local node can respond for some amount of time.

Author:
Jeff Hoye

Method Summary
 void messageReceived(Identifier i, ByteBuffer msg, Map<String,Object> options)
          Called when a message is directly received from the Identifier
 void messageSent(Identifier i, ByteBuffer msg, Map<String,Object> options)
          Called when a message is directly sent to the Identifier
 boolean sendDirect(Identifier i, ByteBuffer msg, Map<String,Object> options)
          True if we believe the firewall will accept the message (due to a recent message from the node)
 

Method Detail

sendDirect

boolean sendDirect(Identifier i,
                   ByteBuffer msg,
                   Map<String,Object> options)
True if we believe the firewall will accept the message (due to a recent message from the node)

Parameters:
i -
Returns:

messageSent

void messageSent(Identifier i,
                 ByteBuffer msg,
                 Map<String,Object> options)
Called when a message is directly sent to the Identifier

Parameters:
i -
msg -
options -

messageReceived

void messageReceived(Identifier i,
                     ByteBuffer msg,
                     Map<String,Object> options)
Called when a message is directly received from the Identifier

Parameters:
i -
msg -
options -


Copyright © 2010. All Rights Reserved.