|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.protocol.RequestReplyExecutor org.xmlBlaster.util.protocol.socket.SocketExecutor org.xmlBlaster.protocol.socket.HandleClient
public class HandleClient
Holds one socket connection to a client and handles all requests from one client with plain socket messaging.
Field Summary | |
---|---|
private I_Authenticate |
authenticate
The singleton handle for this authentication server |
private CallbackSocketDriver |
callback
|
private boolean |
callCoreInSeparateThread
|
protected boolean |
disconnectIsCalled
|
private SocketDriver |
driver
|
protected static java.util.concurrent.ExecutorService |
executorService
|
private boolean |
isShutdownCompletly
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
protected java.lang.String |
remoteSocketStr
Holds remote "host:port" for logging |
private java.lang.String |
secretSessionId
The unique client sessionId |
protected java.net.Socket |
sock
The socket connection to/from one client |
private java.lang.Thread |
socketHandlerThread
|
protected java.net.DatagramSocket |
sockUDP
The socket connection to/from one client |
Fields inherited from class org.xmlBlaster.util.protocol.socket.SocketExecutor |
---|
iStream, loginName, maxChunkSize, msgInfoParserClassName, oStream, running, soLingerTimeout, soTimeout |
Fields inherited from class org.xmlBlaster.util.protocol.RequestReplyExecutor |
---|
addressConfig, addressServer, cbClient, compressZlib, compressZlibStream, contextNode, glob, mbeanHandle, minSizeForCompression, ONEWAY, pingResponseTimeout, prefix, progressListener, responseListenerMap, responseTimeout, updateResponseTimeout, useEmailExpiryTimestamp, WAIT_ON_RESPONSE |
Constructor Summary | |
---|---|
HandleClient(Global glob,
SocketDriver driver,
java.net.Socket sock,
java.net.DatagramSocket sockUDP)
Creates an instance which serves exactly one client. |
Method Summary | |
---|---|
private void |
closeSocket()
|
java.lang.String |
getCbMsgInfoParserClassName()
|
java.lang.String |
getSecretSessionId()
|
java.net.Socket |
getSocket()
|
java.lang.String |
getType()
The protocol type, used for logging |
void |
handleMessage(MsgInfo receiver,
boolean udp)
|
protected boolean |
hasConnection()
|
boolean |
isShutdown()
Check status |
boolean |
isShutdownCompletly()
|
void |
run()
Serve a client, we block until a message arrives ... |
protected void |
sendMessage(byte[] msg,
boolean udp)
Flush the data to the socket. |
void |
shutdown()
Close connection for one specific client |
void |
startThread()
|
java.lang.String |
toString()
|
boolean |
useUdpForOneway()
|
Methods inherited from class org.xmlBlaster.util.protocol.socket.SocketExecutor |
---|
getGlobalKey, getInputStream, getMsgInfoParserClassName, getOutputStream, getSoLingerTimeout, getSoTimeout, getUsageUrl, getVersion, initialize, ping, sendMessage, sendUpdate, setLoginName, setRunning, setSoLingerTimeout, setSoTimeout, setUsageUrl, usage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.xmlBlaster.util.protocol.RequestReplyExecutorMBean |
---|
getMinSizeForCompression, getPingResponseTimeout, getResponseTimeout, getResponseTimeout, getUpdateResponseTimeout, interruptInvocation, isCompressZlib, isCompressZlibStream, isUseEmailExpiryTimestamp, setCompressZlib, setCompressZlibStream, setMinSizeForCompression, setPingResponseTimeout, setResponseTimeout, setUpdateResponseTimeout, setUseEmailExpiryTimestamp |
Field Detail |
---|
private java.lang.String ME
private static java.util.logging.Logger log
private SocketDriver driver
private I_Authenticate authenticate
private CallbackSocketDriver callback
protected java.net.DatagramSocket sockUDP
protected java.lang.String remoteSocketStr
protected java.net.Socket sock
private java.lang.String secretSessionId
private boolean callCoreInSeparateThread
protected static volatile java.util.concurrent.ExecutorService executorService
protected boolean disconnectIsCalled
private boolean isShutdownCompletly
private java.lang.Thread socketHandlerThread
Constructor Detail |
---|
public HandleClient(Global glob, SocketDriver driver, java.net.Socket sock, java.net.DatagramSocket sockUDP) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void startThread()
public boolean useUdpForOneway()
useUdpForOneway
in class SocketExecutor
public java.lang.String getType()
RequestReplyExecutor
getType
in interface I_AdminPlugin
getType
in class RequestReplyExecutor
public boolean isShutdownCompletly()
isShutdownCompletly
in class RequestReplyExecutor
public boolean isShutdown()
I_AdminPlugin
isShutdown
in interface I_AdminPlugin
isShutdown
in class RequestReplyExecutor
protected boolean hasConnection()
hasConnection
in class RequestReplyExecutor
public void shutdown()
shutdown
in interface I_AdminPlugin
shutdown
in class SocketExecutor
public java.lang.String toString()
toString
in class java.lang.Object
private void closeSocket()
public void handleMessage(MsgInfo receiver, boolean udp)
protected void sendMessage(byte[] msg, boolean udp) throws java.io.IOException
java.io.IOException
public java.lang.String getCbMsgInfoParserClassName()
getCbMsgInfoParserClassName
in class SocketExecutor
public void run()
run
in interface java.lang.Runnable
public java.lang.String getSecretSessionId()
public java.net.Socket getSocket()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |