Rice Pastry API

rice.p2p.past.rawserialization
Class DefaultSocketStrategy

java.lang.Object
  extended by rice.p2p.past.rawserialization.DefaultSocketStrategy
All Implemented Interfaces:
SocketStrategy

public class DefaultSocketStrategy
extends java.lang.Object
implements SocketStrategy

A SocketStrategy that always returns the same answer.

Author:
Jeff Hoye

Field Summary
 
Fields inherited from interface rice.p2p.past.rawserialization.SocketStrategy
TYPE_FETCH, TYPE_INSERT
 
Constructor Summary
DefaultSocketStrategy(boolean answer)
           
 
Method Summary
 boolean sendAlongSocket(int sendType, PastContent content)
          Return true to send the content along a socket, false to send it as a message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSocketStrategy

public DefaultSocketStrategy(boolean answer)
Method Detail

sendAlongSocket

public boolean sendAlongSocket(int sendType,
                               PastContent content)
Description copied from interface: SocketStrategy
Return true to send the content along a socket, false to send it as a message.

Specified by:
sendAlongSocket in interface SocketStrategy
Parameters:
sendType - // the reason the content is being transmitted: TYPE_INSERT, TYPE_FETCH etc
Returns:

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection