|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread context.arch.comm.clients.ClientsPool context.arch.comm.clients.Client
This class allows to get an IndependentCommunication object, to send the contained RequestObject via the BaseObject, to get the reply or the exceptions, and to send back all that information to the caller BaseObject thru the BaseObject handleIndependentReply method.
ClientsPool
,
BaseObject
Field Summary | |
static boolean |
DEBUG
Debug flag |
java.lang.String |
id
The id of the client |
protected IndependentCommunication |
indComm
The IndependentCommunication object containing the RequestObject to send |
Fields inherited from class context.arch.comm.clients.ClientsPool |
clientsNumber, comm, DEFAULT_CLIENTS_NUMBER, fifo, threads |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Client(CommunicationsObject commObject,
java.lang.String name)
Creates new Client. |
Method Summary | |
void |
debugprintln(java.lang.Object s)
Print a message if the DEBUG mode is active |
boolean |
getRequest()
This method tests if the IndependentCommunication is set or not |
void |
releaseRequest()
This method allows to clear the IndependentCommunication of the Client |
void |
run()
The method called to start the Client. |
void |
sendReply()
This method allows to send to the BaseObject the result of the communication, if the client requires the response. |
void |
setRequest(IndependentCommunication independentCommunication)
This method sets the IndependentCommunication of the Client and notifies it. |
protected void |
waitForRequest()
This method allows to wait for the next IndependentCommunication object |
Methods inherited from class context.arch.comm.clients.ClientsPool |
addRequest, stopAllIdleClients |
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 |
Field Detail |
public static boolean DEBUG
public java.lang.String id
protected IndependentCommunication indComm
Constructor Detail |
public Client(CommunicationsObject commObject, java.lang.String name)
name
- The name of the clientMethod Detail |
public void run()
run
in interface java.lang.Runnable
run
in class ClientsPool
SynchFIFO
,
Client
protected void waitForRequest()
public boolean getRequest()
public void setRequest(IndependentCommunication independentCommunication)
independentCommunication
- The IndependentCommunication objectpublic void sendReply()
public void releaseRequest()
public void debugprintln(java.lang.Object s)
s
- Any object, even null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |