|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
CADI.Proxy.Core.ProxyWorker
public class ProxyWorker
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
private boolean |
busy
Indicates if the thread is carrying out a task. |
private boolean |
finish
Indicates whether the thread has to finish when it is working with a request with the keep-alive mode set. |
private HTTPRequest |
httpRequest
Definition in HTTPRequest. |
private HTTPResponseSender |
httpResponseSender
|
private int |
keepAliveTimeout
Definition in Scheduler.keepAliveTimeout. |
private CADILog |
log
It is an object that will be used to log the server process |
private java.io.OutputStream |
os
Is an output stream that will be used to send the server response to the client. |
private ProxyCacheLogicalTargets |
proxyCacheLogicalTargets
Definition in CADI.Proxy.Proxy#logicalTargetList. |
private ProxyMutex |
proxyMutex
Definition in Proxy.proxyMutex |
private ProxyRequestedWOIs |
proxyRequestedWOIs
Definition in CADI.Proxy.Proxy#proxyRequestedWOIs. |
private int |
proxyType
Indicates the type of proxy that will be run. |
private RequestQueue |
requestQueue
Definition in Proxy.requestQueue. |
private java.net.Socket |
socket
Contains the client socket of which request is being processed. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ProxyWorker(java.lang.String threadName,
RequestQueue requestQueue,
ProxyCacheLogicalTargets proxyCacheLogicalTargets,
ProxyRequestedWOIs proxyRequestedWOIs,
ProxyMutex proxyMutex,
CADILog log)
Constructor. |
|
| Method Summary | |
|---|---|
void |
finish()
This method is used to indicate that the thread has to finish. |
java.lang.Thread.State |
getState()
|
boolean |
isBusy()
This method is used to indicate if the thread is or no busy processing a task. |
void |
list(java.io.PrintStream out)
Prints this ProxyWorker out to the specified output stream. |
private void |
listenNewRequest()
|
private void |
processCachedProxy()
|
private void |
processRequest()
|
private void |
processTransparentProxy()
|
void |
run()
|
private void |
sendHTTPResponseError(int statusCode,
java.lang.String reasonPhrase)
|
void |
setKeepAliveTimeout(int keepAliveTimeout)
Sets the keepAliveTimeout attribute. |
void |
setProxyType(int proxyType)
Sets the proxyType attribute. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private RequestQueue requestQueue
Proxy.requestQueue.
private ProxyCacheLogicalTargets proxyCacheLogicalTargets
CADI.Proxy.Proxy#logicalTargetList.
private ProxyRequestedWOIs proxyRequestedWOIs
CADI.Proxy.Proxy#proxyRequestedWOIs.
private CADILog log
private boolean finish
finish()private boolean busy
busy attribute is false.
private java.net.Socket socket
private HTTPRequest httpRequest
HTTPRequest.
private int keepAliveTimeout
Scheduler.keepAliveTimeout.
private int proxyType
Further information, see ProxyDefaultValues.PROXY_TYPE.
private ProxyMutex proxyMutex
Proxy.proxyMutex
private java.io.OutputStream os
private HTTPResponseSender httpResponseSender
| Constructor Detail |
|---|
public ProxyWorker(java.lang.String threadName,
RequestQueue requestQueue,
ProxyCacheLogicalTargets proxyCacheLogicalTargets,
ProxyRequestedWOIs proxyRequestedWOIs,
ProxyMutex proxyMutex,
CADILog log)
threadName - is a string with the name of the thread.requestQueue - definition in requestQueue.logicalTargetList - definition in #logicalTargetList.log - definition in log.| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void setProxyType(int proxyType)
proxyType attribute.
proxyType - definition in proxyType attribute.public void finish()
public boolean isBusy()
true if the thread is processing a task. Otherwise,
it returns false.public java.lang.Thread.State getState()
getState in class java.lang.Threadpublic void setKeepAliveTimeout(int keepAliveTimeout)
keepAliveTimeout attribute.
keepAliveTimeout - definition in keepAliveTimeout.public java.lang.String toString()
toString in class java.lang.Threadpublic void list(java.io.PrintStream out)
out - an output stream.
private void processRequest()
throws WarningException,
ErrorException
WarningException
ErrorException
private void listenNewRequest()
throws WarningException,
ErrorException
WarningException
ErrorException
private void sendHTTPResponseError(int statusCode,
java.lang.String reasonPhrase)
private void processTransparentProxy()
throws ErrorException
ErrorException
private void processCachedProxy()
throws ErrorException
ErrorException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||