|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xmlBlaster.util.dispatch.DispatchConnection
org.xmlBlaster.client.dispatch.ClientDispatchConnection
public final class ClientDispatchConnection
Holding all necessary infos to establish callback connections and invoke their update().
DispatchConnection| Field Summary | |
|---|---|
private java.lang.String[] |
checkPointContext
|
private MsgQueueEntry |
connectEntry
|
private ConnectQosData |
connectQosData
|
private ConnectReturnQos |
connectReturnQos
|
private I_XmlBlasterConnection |
driver
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
private I_MsgSecurityInterceptor |
securityInterceptor
|
| Fields inherited from class org.xmlBlaster.util.dispatch.DispatchConnection |
|---|
address, connectionsHandler, glob, myId, physicalConnectionOk, PING_THREAD_NAME, previousBytesRead, previousBytesWritten, retryCounter, serverAcceptsRequests, state |
| Constructor Summary | |
|---|---|
ClientDispatchConnection(Global glob,
ClientDispatchConnectionsHandler connectionsHandler,
AddressBase address)
|
|
| Method Summary | |
|---|---|
private void |
connect(MsgQueueEntry entry)
Encrypt and send a connect request, decrypt the returned data |
void |
connectLowlevel()
Connect on protocol layer and try an initial low level ping. |
private void |
disconnect(MsgQueueEntry entry)
Encrypt and send a disconnect request, decrypt the returned data |
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 to xmlBlaster. |
private void |
erase(MsgQueueEntry entry)
Encrypt and send a erase request, decrypt the returned data |
protected boolean |
forcePingFailure()
|
private void |
get(MsgQueueEntry entry)
Encrypt and send a synchronous get request, decrypt the returned data |
java.lang.String |
getDriverName()
A human readable name of the protocol plugin |
private java.lang.String |
getEncryptedConnectQos(ConnectQosData cqd)
Remember the cqd in this.connectQosData and return the encrypted string. |
java.lang.String |
getName()
|
void |
loadPlugin()
Load the appropriate protocol driver, e.g the CORBA protocol plugin. |
private void |
publish(MsgQueueEntry[] msgArr_)
|
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 |
private void |
setCheckpointContext(ConnectReturnQos qr)
|
void |
shutdown(boolean delayed)
Stop all callback drivers of this client. |
private void |
subscribe(MsgQueueEntry entry)
Encrypt and send a subscribe request, decrypt the returned data |
java.lang.String |
toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string. |
private void |
unSubscribe(MsgQueueEntry entry)
Encrypt and send a unSubscribe request, decrypt the returned data |
| Methods inherited from class org.xmlBlaster.util.dispatch.DispatchConnection |
|---|
finalize, getAddress, getState, handleTransition, initialize, isAlive, isConnectionWasDown, isDead, isPolling, isUndef, ping, ping, send, setAddress, setConnectionWasDown, spanPingTimer, timeout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.util.logging.Logger log
private final java.lang.String ME
private I_XmlBlasterConnection driver
private final I_MsgSecurityInterceptor securityInterceptor
private ConnectQosData connectQosData
private ConnectReturnQos connectReturnQos
private java.lang.String[] checkPointContext
private MsgQueueEntry connectEntry
| Constructor Detail |
|---|
public ClientDispatchConnection(Global glob,
ClientDispatchConnectionsHandler connectionsHandler,
AddressBase address)
throws XmlBlasterException
connectionsHandler - The DevliveryConnectionsHandler witch i belong toaAddress - The address i shall connect to
XmlBlasterException| Method Detail |
|---|
public final java.lang.String getDriverName()
DispatchConnection
getDriverName in class DispatchConnectionpublic final java.lang.String getName()
getName in class DispatchConnection
public final void loadPlugin()
throws XmlBlasterException
This method is called by our base class during initialization.
loadPlugin in class DispatchConnectionXmlBlasterException
public final void connectLowlevel()
throws XmlBlasterException
DispatchConnection
connectLowlevel in class DispatchConnectionXmlBlasterException - with ErrorCode.COMMUNICATION* if server is not reachable
or other exceptions on other errorsDispatchConnection.connectLowlevel()
public void doSend(MsgQueueEntry[] msgArr_,
boolean isAsyncMode)
throws XmlBlasterException
doSend in class DispatchConnectionmsgArr - The messages to send.
msgArr[i].getReturnVal() will contain the returned QoS object or null for oneway operationsisAsyncMode - true if coming from queue
XmlBlasterExceptionprivate void setCheckpointContext(ConnectReturnQos qr)
private void publish(MsgQueueEntry[] msgArr_)
throws XmlBlasterException
XmlBlasterException
private void subscribe(MsgQueueEntry entry)
throws XmlBlasterException
XmlBlasterException
private void unSubscribe(MsgQueueEntry entry)
throws XmlBlasterException
XmlBlasterException
private void get(MsgQueueEntry entry)
throws XmlBlasterException
XmlBlasterException
private void erase(MsgQueueEntry entry)
throws XmlBlasterException
XmlBlasterException
private java.lang.String getEncryptedConnectQos(ConnectQosData cqd)
throws XmlBlasterException
XmlBlasterException
private void connect(MsgQueueEntry entry)
throws XmlBlasterException
XmlBlasterException
private void disconnect(MsgQueueEntry entry)
throws XmlBlasterException
XmlBlasterException
public final java.lang.String doPing(java.lang.String data)
throws XmlBlasterException
DispatchConnection
doPing in class DispatchConnectiondata - QoS, never null
XmlBlasterExceptionDispatchConnection.doPing(String)public final void resetConnection()
resetConnection in class DispatchConnection
protected final void reconnect()
throws XmlBlasterException
reconnect in class DispatchConnectionXmlBlasterException
public final void shutdown(boolean delayed)
throws XmlBlasterException
shutdown in class DispatchConnectionXmlBlasterExceptionpublic final java.lang.String toXml(java.lang.String extraOffset)
toXml in class DispatchConnectionextraOffset - indenting of tags for nice output
public I_ProgressListener registerProgressListener(I_ProgressListener listener)
DispatchConnection
registerProgressListener in class DispatchConnectionprotected boolean forcePingFailure()
forcePingFailure in class DispatchConnection
|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||