restgroupsClient
Class RestGroupsBlockingMessageReceptionThread

java.lang.Object
  extended by java.lang.Thread
      extended by restgroupsClient.RestGroupsBlockingMessageReceptionThread
All Implemented Interfaces:
java.lang.Runnable

public class RestGroupsBlockingMessageReceptionThread
extends java.lang.Thread

Used by blocking message reception mechanism. This thread is responsible for retrieving messages from the server.

Author:
tkob

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
RestGroupsBlockingMessageReceptionThread(RestGroupsClient restGroupsClient)
          Constructor.
 
Method Summary
 void addListener(RestGroupsMessageListener listener)
          Adds a listener which can handle received messages.
 void removeListener(RestGroupsMessageListener listener)
          Removes a listener from the list of objects which handle received messages.
 void run()
           
 
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

RestGroupsBlockingMessageReceptionThread

public RestGroupsBlockingMessageReceptionThread(RestGroupsClient restGroupsClient)
Constructor.

Parameters:
restGroupsClient - reference to the 'parent' RestGroupsClient object.
Method Detail

run

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

addListener

public void addListener(RestGroupsMessageListener listener)
Adds a listener which can handle received messages.

Parameters:
listener - a listener which can handle received messages

removeListener

public void removeListener(RestGroupsMessageListener listener)
Removes a listener from the list of objects which handle received messages.

Parameters:
listener - a listener which handles received messages