|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.util.protocol.RequestReplyExecutor
org.xmlBlaster.util.protocol.socket.SocketExecutor
org.xmlBlaster.client.protocol.socket.SocketCallbackImpl
Used for client to receive xmlBlaster callbacks over plain sockets.
One instance of this for each client, as a separate thread blocking on the socket input stream waiting for messages from xmlBlaster.
MsgInfo,
The protocol.socket requirement| Nested Class Summary |
| Nested classes inherited from class org.xmlBlaster.util.protocol.RequestReplyExecutor |
|
| Field Summary | |
private boolean |
acceptRemoteLoginAsTunnel
|
private I_Authenticate |
authenticateCore
|
private CallbackAddress |
callbackAddress
|
private java.lang.Thread |
callbackListenerThread
|
private Global |
glob
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
private PluginInfo |
pluginInfo
|
private SocketExecutor |
remoteLoginAsTunnelSocketExecutor
|
private java.lang.String |
secretSessionId
|
protected java.net.Socket |
sock
The socket connection to/from one client |
private SocketConnection |
sockCon
The connection manager 'singleton' |
private SocketUrl |
socketUrl
A unique name for this client socket |
private boolean |
threadRunning
Stop the thread |
private boolean |
useRemoteLoginAsTunnel
For cluster environment only |
| 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, mbeanHandle, minSizeForCompression, ONEWAY, pingResponseTimeout, prefix, progressListener, responseListenerMap, responseTimeout, updateResponseTimeout, useEmailExpiryTimestamp, WAIT_ON_RESPONSE |
| Constructor Summary | |
SocketCallbackImpl()
Called by plugin loader which calls init(Global, PluginInfo) thereafter. |
|
| Method Summary | |
I_Authenticate |
getAuthenticateCore()
|
java.lang.String |
getCbAddress()
Returns the callback address. |
java.lang.String |
getCbProtocol()
Returns the protocol type. |
(package private) SocketConnection |
getSocketConnection()
|
SocketExecutor |
getSocketExecutor()
|
java.lang.String |
getType()
Enforced by I_Plugin |
java.lang.String |
getVersion()
Enforced by I_Plugin |
protected boolean |
hasConnection()
|
void |
init(Global glob,
PluginInfo pluginInfo)
This method is called by the PluginManager (enforced by I_Plugin). |
void |
initialize(Global glob,
java.lang.String loginName,
CallbackAddress callbackAddress,
I_CallbackExtended cbClient)
Initialize and start the callback server A thread receiving all messages from xmlBlaster, and delivering them back to the client code. |
void |
run()
Starts the callback thread |
void |
setAuthenticateCore(I_Authenticate authenticateImpl)
|
void |
setRunning(boolean run)
|
void |
shutdown()
Shutdown callback only. |
void |
shutdownSocket()
Shutdown SOCKET connection and callback Called by SocketConnection.shutdown() on problems |
| Methods inherited from class org.xmlBlaster.util.protocol.socket.SocketExecutor |
getCbMsgInfoParserClassName, getGlobalKey, getInputStream, getMsgInfoParserClassName, getOutputStream, getSoLingerTimeout, getSoTimeout, getUsageUrl, initialize, ping, sendMessage, sendUpdate, setLoginName, setSoLingerTimeout, setSoTimeout, setUsageUrl, usage, useUdpForOneway |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 |
| Methods inherited from interface org.xmlBlaster.util.admin.I_AdminPlugin |
isShutdown |
| Field Detail |
private java.lang.String ME
private Global glob
private static java.util.logging.Logger log
private SocketConnection sockCon
private SocketUrl socketUrl
private CallbackAddress callbackAddress
private PluginInfo pluginInfo
protected java.net.Socket sock
private boolean threadRunning
private boolean useRemoteLoginAsTunnel
private SocketExecutor remoteLoginAsTunnelSocketExecutor
private boolean acceptRemoteLoginAsTunnel
private java.lang.String secretSessionId
private I_Authenticate authenticateCore
private java.lang.Thread callbackListenerThread
| Constructor Detail |
public SocketCallbackImpl()
After polling -> alive NO new instance is created, but only initialize() is called
| Method Detail |
public java.lang.String getType()
getType in interface I_PlugingetType in class RequestReplyExecutorpublic java.lang.String getVersion()
getVersion in interface I_PlugingetVersion in class SocketExecutor
public void init(Global glob,
PluginInfo pluginInfo)
init in interface I_PluginI_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)public void setRunning(boolean run)
setRunning in class SocketExecutorpublic SocketExecutor getSocketExecutor()
public final void initialize(Global glob,
java.lang.String loginName,
CallbackAddress callbackAddress,
I_CallbackExtended cbClient)
throws XmlBlasterException
Same SocketCallback instance is called several times by SocketConnection.connectLowLevel() (on polling->alive)
initialize in interface I_CallbackServerglob - The global handle with your environment settingsloginName - The login name of the client, for logging onlycallbackAddress - The address configuration of this callback servercbClient - Your implementation to receive the callback messages from xmlBlaster
XmlBlasterExceptionprotected boolean hasConnection()
hasConnection in class RequestReplyExecutorpublic final java.lang.String getCbProtocol()
getCbProtocol in interface I_CallbackServer
public java.lang.String getCbAddress()
throws XmlBlasterException
getCbAddress in interface I_CallbackServerXmlBlasterExceptionpublic void run()
run in interface java.lang.Runnablefinal SocketConnection getSocketConnection()
public void shutdown()
shutdown in interface I_CallbackServershutdown in class SocketExecutorpublic void shutdownSocket()
public I_Authenticate getAuthenticateCore()
public void setAuthenticateCore(I_Authenticate authenticateImpl)
|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||