Rice Pastry API

org.mpisws.p2p.transport.rendezvous
Class TimeoutResponseStrategy<Identifier>

java.lang.Object
  extended by org.mpisws.p2p.transport.rendezvous.TimeoutResponseStrategy<Identifier>
Type Parameters:
Identifier -
All Implemented Interfaces:
ResponseStrategy<Identifier>

public class TimeoutResponseStrategy<Identifier>
extends java.lang.Object
implements ResponseStrategy<Identifier>

This impl allows responses up to timeout millis later.

Author:
Jeff Hoye

Constructor Summary
TimeoutResponseStrategy(int timeout, Environment env)
           
 
Method Summary
 void messageReceived(Identifier i, java.nio.ByteBuffer msg, java.util.Map<java.lang.String,java.lang.Object> options)
          Called when a message is directly received from the Identifier
 void messageSent(Identifier i, java.nio.ByteBuffer msg, java.util.Map<java.lang.String,java.lang.Object> options)
          Called when a message is directly sent to the Identifier
 boolean sendDirect(Identifier i, java.nio.ByteBuffer msg, java.util.Map<java.lang.String,java.lang.Object> options)
          True if we believe the firewall will accept the message (due to a recent message from the node)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeoutResponseStrategy

public TimeoutResponseStrategy(int timeout,
                               Environment env)
Method Detail

messageReceived

public void messageReceived(Identifier i,
                            java.nio.ByteBuffer msg,
                            java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface: ResponseStrategy
Called when a message is directly received from the Identifier

Specified by:
messageReceived in interface ResponseStrategy<Identifier>

messageSent

public void messageSent(Identifier i,
                        java.nio.ByteBuffer msg,
                        java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface: ResponseStrategy
Called when a message is directly sent to the Identifier

Specified by:
messageSent in interface ResponseStrategy<Identifier>

sendDirect

public boolean sendDirect(Identifier i,
                          java.nio.ByteBuffer msg,
                          java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface: ResponseStrategy
True if we believe the firewall will accept the message (due to a recent message from the node)

Specified by:
sendDirect in interface ResponseStrategy<Identifier>
Returns:

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection