|
xmlBlaster 1.6.2 contributions API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.contrib.MomEventEngine
| Field Summary | |
protected org.xmlBlaster.client.I_XmlBlasterAccess |
con
|
protected org.xmlBlaster.client.qos.ConnectQos |
connectQos
|
protected I_Update |
eventHandler
|
protected org.xmlBlaster.util.Global |
glob
|
protected java.lang.String |
loginName
|
protected java.lang.String |
password
|
protected boolean |
shutdownMom
|
protected java.util.List |
subscribeKeyList
|
protected java.util.List |
subscribeQosList
|
| Constructor Summary | |
MomEventEngine()
|
|
| Method Summary | |
static byte[] |
compress(byte[] buffer,
java.util.Map props,
int compressSizeLimit,
java.lang.String zipType)
Compresses the message if needed. |
static byte[] |
compressOLD(byte[] buffer,
java.util.Map props,
int compressSizeLimit,
java.lang.String zipType)
Deprecated. |
static java.io.InputStream |
decompress(java.io.InputStream is,
java.util.Map clientProperties)
|
static byte[] |
decompressXX(byte[] buffer,
java.util.Map clientProperties)
Deprecated. you should use the one with InputStream instead since less memory hungry (for big messages) |
org.xmlBlaster.jms.XBSession |
getJmsSession()
Only used in replication, can return null if not used. |
java.util.Set |
getUsedPropertyKeys()
Gets all property keys which may be used by this object. |
void |
init(I_Info info)
After creation this method is called. |
java.lang.String |
publish(java.lang.String oid,
byte[] message,
java.util.Map attrMap)
Send the message to the MoM. |
boolean |
registerAlertListener(I_Update update,
java.util.Map attrs)
Register for alerts when the data source has changed. |
void |
shutdown()
Cleanup resources. |
java.lang.String |
update(java.lang.String cbSessionId,
org.xmlBlaster.client.key.UpdateKey updateKey,
byte[] content,
org.xmlBlaster.client.qos.UpdateQos updateQos)
This is the callback method invoked from I_XmlBlasterAccess informing the client in an asynchronous mode about a new message. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.xmlBlaster.util.Global glob
protected org.xmlBlaster.client.I_XmlBlasterAccess con
protected java.lang.String loginName
protected java.lang.String password
protected java.util.List subscribeKeyList
protected java.util.List subscribeQosList
protected org.xmlBlaster.client.qos.ConnectQos connectQos
protected I_Update eventHandler
protected boolean shutdownMom
| Constructor Detail |
public MomEventEngine()
| Method Detail |
public java.util.Set getUsedPropertyKeys()
I_ContribPlugin
getUsedPropertyKeys in interface I_ContribPluginI_ContribPlugin.getUsedPropertyKeys()
public void init(I_Info info)
throws java.lang.Exception
I_ChangePublisher
init in interface I_ChangePublisherinfo - The configuration environment
java.lang.Exception - MoM specific
public java.lang.String update(java.lang.String cbSessionId,
org.xmlBlaster.client.key.UpdateKey updateKey,
byte[] content,
org.xmlBlaster.client.qos.UpdateQos updateQos)
throws org.xmlBlaster.util.XmlBlasterException
org.xmlBlaster.client.I_Callback
update in interface org.xmlBlaster.client.I_CallbackcbSessionId - 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.
org.xmlBlaster.util.XmlBlasterExceptionI_XmlBlasterAccess
public java.lang.String publish(java.lang.String oid,
byte[] message,
java.util.Map attrMap)
throws java.lang.Exception
I_ChangePublisher
publish in interface I_ChangePublishermessage - the content of the message to publish.oid - Can be used to create the topic nameattrMap - An optional map with attributes or null
java.lang.Exception - On sending problems
public boolean registerAlertListener(I_Update update,
java.util.Map attrs)
throws java.lang.Exception
I_ChangePublisherThis funtionality is plugin depending, for example the xmlBlaster plugin has a configuration option to subscribe on a alert topic and listens if somebody publishes a message to it. If such a message arrives we trigger a new database poll.
registerAlertListener in interface I_ChangePublisherupdate - The callback interface to receive the notificationattrs - extra parameters to pass for the registration. For example
if one implementation wants to do a specific extra subscription it would
pass the quality of service in the attributes.
java.lang.Exception - The MoM specific exceptionpublic void shutdown()
I_ChangePublisherCan be called multiple times if instance is reused from different plugins.
shutdown in interface I_ChangePublisherpublic org.xmlBlaster.jms.XBSession getJmsSession()
I_ChangePublisher
getJmsSession in interface I_ChangePublisherI_ChangePublisher.getJmsSession()
public static byte[] compressOLD(byte[] buffer,
java.util.Map props,
int compressSizeLimit,
java.lang.String zipType)
buffer - The buffer to compressprops - The properties to update with the compressed flag (uncompressed size)compressSizeLimit - The limit for compression. If less than one no compression
is done. If the size of the buffer is less than this limit it is not compressed either.
public static byte[] compress(byte[] buffer,
java.util.Map props,
int compressSizeLimit,
java.lang.String zipType)
buffer - The buffer to compressprops - The properties to update with the compressed flag (uncompressed size)compressSizeLimit - The limit for compression. If less than one no compression
is done. If the size of the buffer is less than this limit it is not compressed either.
public static byte[] decompressXX(byte[] buffer,
java.util.Map clientProperties)
buffer - clientProperties -
public static java.io.InputStream decompress(java.io.InputStream is,
java.util.Map clientProperties)
|
xmlBlaster 1.6.2 contributions API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||