fr.lifl.magique.util
Class Listener

java.lang.Object
  extended byjava.lang.Thread
      extended byfr.lifl.magique.util.Listener
All Implemented Interfaces:
java.lang.Runnable

public class Listener
extends java.lang.Thread

a Listener belongs to an agent(a AbstractAgent object in fact). It checks when requests arrive and execute them. It is a thread

See Also:
Thread

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Listener(AbstractAgent agent)
           
 
Method Summary
 AbstractAgent getAgent()
          returns the agent I belongs to
 void halt()
          halts the Listener : no more requests are managed
 void run()
          executes requests in to do list of my agent when they arrive. each request is processed in a separate thread (synchronization must then be set in methods if required)
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

Listener

public Listener(AbstractAgent agent)
Parameters:
agent - the agent I belongs to
Method Detail

getAgent

public AbstractAgent getAgent()
returns the agent I belongs to

Returns:
the agent I belongs to

halt

public void halt()
halts the Listener : no more requests are managed


run

public void run()
executes requests in to do list of my agent when they arrive. each request is processed in a separate thread (synchronization must then be set in methods if required)

Returns:
no return value
See Also:
RequestProcessor