grinda.client
Class TupleSpaceListenerNotifier

java.lang.Object
  extended by java.lang.Thread
      extended by grinda.client.TupleSpaceListenerNotifier
All Implemented Interfaces:
java.lang.Runnable

public class TupleSpaceListenerNotifier
extends java.lang.Thread

Notifies TupleListeners of operations occured on the tuple space


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TupleSpaceListenerNotifier()
           
 
Method Summary
 void addListener(TupleSpaceOperation op, TupleSpaceListener l)
          Adds a listener interesed in observing the given template
 void deliver(java.util.List topicPath, EndpointReferenceType producer, java.lang.Object message)
          This function is called by the service to notify the operation
 java.lang.String getAddress()
           
 void removeListener(TupleSpaceOperation op, TupleSpaceListener l)
          Removes a listener
 void run()
           
 void setAddress(java.lang.String addr)
           
 void stopListening()
          Stops this thread
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TupleSpaceListenerNotifier

public TupleSpaceListenerNotifier()
Method Detail

setAddress

public void setAddress(java.lang.String addr)

getAddress

public java.lang.String getAddress()

deliver

public void deliver(java.util.List topicPath,
                    EndpointReferenceType producer,
                    java.lang.Object message)
This function is called by the service to notify the operation

Parameters:
e - informations about the operation

addListener

public void addListener(TupleSpaceOperation op,
                        TupleSpaceListener l)
Adds a listener interesed in observing the given template

Parameters:
op - the operation type to observe
l - the listener

removeListener

public void removeListener(TupleSpaceOperation op,
                           TupleSpaceListener l)
Removes a listener

Parameters:
op - the operation that has been observed
l - the listener

stopListening

public void stopListening()
Stops this thread


run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread


Copyright © 2006 Sirio Capizzi. All Rights Reserved.