|
xmlBlaster 2.2.0 client 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.client.protocol.socket.SocketCallbackImpl
public class 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 requirementField Summary | |
---|---|
protected java.net.Socket |
sock
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, 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 | |
---|---|
org.xmlBlaster.protocol.I_Authenticate |
getAuthenticateCore()
|
java.lang.String |
getCbAddress()
Returns the callback address. |
java.lang.String |
getCbProtocol()
Returns the protocol type. |
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(org.xmlBlaster.protocol.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 |
---|
protected java.net.Socket sock
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_AdminPlugin
getType
in interface I_Plugin
getType
in class RequestReplyExecutor
public java.lang.String getVersion()
getVersion
in interface I_AdminPlugin
getVersion
in interface I_Plugin
getVersion
in class SocketExecutor
public void init(Global glob, PluginInfo pluginInfo)
init
in interface I_Plugin
I_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)
public void setRunning(boolean run)
setRunning
in class SocketExecutor
public 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_CallbackServer
glob
- 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
XmlBlasterException
protected boolean hasConnection()
hasConnection
in class RequestReplyExecutor
public final java.lang.String getCbProtocol()
getCbProtocol
in interface I_CallbackServer
public java.lang.String getCbAddress() throws XmlBlasterException
getCbAddress
in interface I_CallbackServer
XmlBlasterException
public void run()
run
in interface java.lang.Runnable
public void shutdown()
shutdown
in interface I_CallbackServer
shutdown
in interface I_AdminPlugin
shutdown
in interface I_Plugin
shutdown
in class SocketExecutor
public void shutdownSocket()
public org.xmlBlaster.protocol.I_Authenticate getAuthenticateCore()
public void setAuthenticateCore(org.xmlBlaster.protocol.I_Authenticate authenticateImpl)
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |