grinda.impl.brokers
Class LearningTupleBroker

java.lang.Object
  extended by grinda.impl.brokers.LearningTupleBroker
All Implemented Interfaces:
ClientListener, PeerListener, RequestListener, ResultListener, SubscriptionListener, TupleBroker, java.lang.Cloneable

public class LearningTupleBroker
extends java.lang.Object
implements TupleBroker, PeerListener

This class implements a tuple broker that tries to learn the destionation of the tuples from the previuos operations

Version:
1.0
Author:
Sirio Capizzi

Constructor Summary
LearningTupleBroker()
           
 
Method Summary
 TupleSpaceResult clientRequest(TupleSpaceOperation op, java.lang.String client)
          Called when the client performs an
 java.lang.Object clone()
           
 java.lang.Object getID()
           
 void initialize(java.lang.String id, TupleSpaceConfigurationParameter[] c)
           
 void peerJoined(java.lang.String h)
           
 void peerLeft(java.lang.String h)
           
 GrindaResponse peerRequest(GrindaRequest m)
          Called when a result arrives
 void peerResult(GrindaResponse m)
          Called when a result arrives
 void subscribe(TupleSpaceOperation op, java.lang.String h)
           
 void unsubscribe(TupleSpaceOperation op, java.lang.String h)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LearningTupleBroker

public LearningTupleBroker()
Method Detail

clone

public java.lang.Object clone()
Specified by:
clone in interface TupleBroker
Overrides:
clone in class java.lang.Object

getID

public java.lang.Object getID()

initialize

public void initialize(java.lang.String id,
                       TupleSpaceConfigurationParameter[] c)
Specified by:
initialize in interface TupleBroker

subscribe

public void subscribe(TupleSpaceOperation op,
                      java.lang.String h)
Specified by:
subscribe in interface SubscriptionListener

unsubscribe

public void unsubscribe(TupleSpaceOperation op,
                        java.lang.String h)
Specified by:
unsubscribe in interface SubscriptionListener

peerJoined

public void peerJoined(java.lang.String h)
Specified by:
peerJoined in interface PeerListener

peerLeft

public void peerLeft(java.lang.String h)
Specified by:
peerLeft in interface PeerListener

clientRequest

public TupleSpaceResult clientRequest(TupleSpaceOperation op,
                                      java.lang.String client)
                               throws java.rmi.RemoteException
Description copied from interface: ClientListener
Called when the client performs an

Specified by:
clientRequest in interface ClientListener
Parameters:
op - TupleSpaceOperation
client - String
Returns:
InternalTuple
Throws:
java.rmi.RemoteException

peerRequest

public GrindaResponse peerRequest(GrindaRequest m)
Description copied from interface: RequestListener
Called when a result arrives

Specified by:
peerRequest in interface RequestListener
Parameters:
m - the message representing the result

peerResult

public void peerResult(GrindaResponse m)
Description copied from interface: ResultListener
Called when a result arrives

Specified by:
peerResult in interface ResultListener
Parameters:
m - the message representing the result


Copyright © 2006 Sirio Capizzi. All Rights Reserved.