|
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.dispatch.DispatchConnection org.xmlBlaster.engine.dispatch.CbDispatchConnection
public final class CbDispatchConnection
Holding all necessary infos to establish callback connections and invoke their update().
DispatchConnection
Nested Class Summary | |
---|---|
(package private) class |
CbDispatchConnection.Holder
|
Field Summary | |
---|---|
private I_CallbackDriver |
cbDriver
|
private java.lang.String |
cbKey
|
private static java.util.logging.Logger |
log
|
java.lang.String |
ME
|
private I_AdminSession |
session
|
private SessionName |
sessionName
|
private boolean |
useRemoteLoginAsTunnel
|
Fields inherited from class org.xmlBlaster.util.dispatch.DispatchConnection |
---|
address, connectionsHandler, glob, myId, physicalConnectionOk, PING_THREAD_NAME, previousBytesRead, previousBytesWritten, retryCounter, serverAcceptsRequests, state |
Constructor Summary | |
---|---|
CbDispatchConnection(Global glob,
CbDispatchConnectionsHandler connectionsHandler,
AddressBase address)
|
Method Summary | |
---|---|
void |
connectLowlevel()
Connect on protocol layer and try an initial low level ping. |
java.lang.String |
doPing(java.lang.String data)
Does the real ping to the remote server instance. |
void |
doSend(MsgQueueEntry[] msgArr_,
boolean isAsyncMode)
Send the messages back to the client. |
private void |
exportCrypt(java.util.ArrayList holderList,
MethodName methodName)
We export/encrypt the message (call the interceptor) |
protected boolean |
forcePingFailure()
|
I_AdminSession |
getAdminSession()
|
java.lang.String |
getDriverName()
The name of the protocol driver |
java.lang.String |
getName()
|
void |
loadPlugin()
Load the appropriate protocol driver |
protected void |
reconnect()
On reconnect polling try to establish the connection. |
I_ProgressListener |
registerProgressListener(I_ProgressListener listener)
Should be overwritten by extending classes. |
void |
resetConnection()
Nothing to do here |
void |
setAddress(AddressBase address)
|
void |
shutdown(boolean delayed)
Stop all callback drivers of this client. |
java.lang.String |
toString()
|
java.lang.String |
toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string. |
Methods inherited from class org.xmlBlaster.util.dispatch.DispatchConnection |
---|
finalize, getAddress, getState, handleTransition, initialize, isAlive, isConnectionWasDown, isDead, isPolling, isUndef, ping, ping, send, setConnectionWasDown, spanPingTimer, timeout |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static java.util.logging.Logger log
public final java.lang.String ME
private I_CallbackDriver cbDriver
private java.lang.String cbKey
private I_AdminSession session
private SessionName sessionName
private boolean useRemoteLoginAsTunnel
Constructor Detail |
---|
public CbDispatchConnection(Global glob, CbDispatchConnectionsHandler connectionsHandler, AddressBase address) throws XmlBlasterException
connectionsHandler
- The DevliveryConnectionsHandler witch i belong toaddress
- The address i shall connect to
XmlBlasterException
Method Detail |
---|
public final java.lang.String getName()
getName
in class DispatchConnection
public java.lang.String toString()
toString
in class java.lang.Object
public void setAddress(AddressBase address) throws XmlBlasterException
setAddress
in class DispatchConnection
XmlBlasterException
public final java.lang.String getDriverName()
getDriverName
in class DispatchConnection
public final void loadPlugin() throws XmlBlasterException
loadPlugin
in class DispatchConnection
XmlBlasterException
public I_ProgressListener registerProgressListener(I_ProgressListener listener)
DispatchConnection
registerProgressListener
in class DispatchConnection
public final void connectLowlevel() throws XmlBlasterException
DispatchConnection
connectLowlevel
in class DispatchConnection
XmlBlasterException
- with ErrorCode.COMMUNICATION* if server is not reachable
or other exceptions on other errorsDispatchConnection.connectLowlevel()
private void exportCrypt(java.util.ArrayList holderList, MethodName methodName) throws XmlBlasterException
holderList
- list of Holder instancesmethodName
- UPDATE or UPDATE_ONEWAY
XmlBlasterException
public void doSend(MsgQueueEntry[] msgArr_, boolean isAsyncMode) throws XmlBlasterException
doSend
in class DispatchConnection
msgArr
- Should be a copy of the original, since we export it which changes/encrypts the content
The RETURN value is transferred in the msgArr[i].getReturnObj(), for oneway updates it is null
XmlBlasterException
public final java.lang.String doPing(java.lang.String data) throws XmlBlasterException
DispatchConnection
doPing
in class DispatchConnection
data
- QoS, never null
XmlBlasterException
DispatchConnection.doPing(String)
public final void resetConnection()
resetConnection
in class DispatchConnection
protected final void reconnect() throws XmlBlasterException
reconnect
in class DispatchConnection
XmlBlasterException
public final void shutdown(boolean delayed) throws XmlBlasterException
shutdown
in class DispatchConnection
XmlBlasterException
public final java.lang.String toXml(java.lang.String extraOffset)
toXml
in class DispatchConnection
extraOffset
- indenting of tags for nice output
public I_AdminSession getAdminSession()
protected boolean forcePingFailure()
forcePingFailure
in class DispatchConnection
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |