|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xmlBlaster.util.dispatch.plugins.prio.XmlBlasterNativeClient
public final class XmlBlasterNativeClient
Helper class encapsulates xmlBlaster access for PriorizedDispatchPlugin.
We subscribe to a status message which describes the current connection to the remote side.
Exactly one instance of this class exists in the Global scope, the shutdown is triggered by util.Global using DispatchPluginManager.shutdown()
Field Summary | |
---|---|
private java.lang.String |
cbSessionId
|
private boolean |
connected
|
private ConnectQos |
connectQos
|
private ConnectReturnQos |
conRetQos
|
private Global |
glob
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
loginName
|
private java.lang.String |
ME
|
private java.util.Map |
oidListenerMap
The key is the message oid, the value is a set with listeners |
private java.util.Map |
subscriptionsByNotifierMap
The key is a I_Notify instance, the value is a set with SubscriptionReturnQos objects |
private I_XmlBlasterAccess |
xmlBlasterCon
|
Constructor Summary | |
---|---|
XmlBlasterNativeClient(Global glob_,
PriorizedDispatchPlugin plugin,
java.lang.String sessionId)
Creates a remote client to xmlBlaster. |
Method Summary | |
---|---|
java.lang.String |
getLoginName()
|
void |
sendPtPMessage(MsgQueueEntry entry,
java.lang.String pluginName,
java.lang.String action,
java.lang.String currStatus)
Send a PtP message to the publisher notifying him on problems about dispatching his just published message. |
(package private) void |
shutdown()
|
(package private) void |
shutdown(I_Notify callback)
|
void |
subscribeToStatusMessage(java.lang.String msgOid,
I_Notify callback)
We subscribe to the status message (e.g. |
void |
unSubscribeStatusMessages(I_Notify callback)
Unsubscribe from all status messages, usually if configuration has changed. |
java.lang.String |
update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
Callback from xmlBlaster core |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String ME
private Global glob
private static java.util.logging.Logger log
private I_XmlBlasterAccess xmlBlasterCon
private ConnectQos connectQos
private ConnectReturnQos conRetQos
private boolean connected
private java.lang.String loginName
private java.util.Map subscriptionsByNotifierMap
private java.util.Map oidListenerMap
private final java.lang.String cbSessionId
Constructor Detail |
---|
public XmlBlasterNativeClient(Global glob_, PriorizedDispatchPlugin plugin, java.lang.String sessionId) throws XmlBlasterException
XmlBlasterException
Method Detail |
---|
public java.lang.String getLoginName()
public final void sendPtPMessage(MsgQueueEntry entry, java.lang.String pluginName, java.lang.String action, java.lang.String currStatus) throws XmlBlasterException
The message oid remains the same as that one published
The sender of this PtP message is the loginName of the plugin itself - to avoid looping we check the sender name in our plugin
XmlBlasterException
public void subscribeToStatusMessage(java.lang.String msgOid, I_Notify callback) throws XmlBlasterException
XmlBlasterException
public void unSubscribeStatusMessages(I_Notify callback)
public java.lang.String update(java.lang.String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos)
update
in interface I_Callback
cbSessionId
- The session ID specified by the client which registered the callback.
You can specify a cbSessionId during connection (with ConnectQos)
and this is bounced back here so you can authenticate the message.updateKey
- The arrived key containing the topic namecontent
- The arrived message content. This is your payload.I_XmlBlasterAccess
void shutdown(I_Notify callback)
void shutdown()
I_MsgDispatchInterceptor#shutdown()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |