|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.contrib.dbwriter.SqlInfoStreamPublisher
public class SqlInfoStreamPublisher
Field Summary | |
---|---|
protected I_Update |
eventHandler
|
Constructor Summary | |
---|---|
SqlInfoStreamPublisher()
|
Method Summary | |
---|---|
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. |
static void |
main(java.lang.String[] args)
|
void |
parse()
|
java.lang.String |
publish(java.lang.String changeKey,
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. |
void |
timeout(java.lang.Object userData)
You will be notified about the timeout through this method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected I_Update eventHandler
Constructor Detail |
---|
public SqlInfoStreamPublisher()
Method Detail |
---|
public void parse() throws java.lang.Exception
java.lang.Exception
public org.xmlBlaster.jms.XBSession getJmsSession()
I_ChangePublisher
getJmsSession
in interface I_ChangePublisher
public void init(I_Info info_) throws java.lang.Exception
I_ChangePublisher
init
in interface I_ChangePublisher
init
in interface I_ContribPlugin
info_
- The configuration environment
java.lang.Exception
- MoM specificpublic java.lang.String publish(java.lang.String changeKey, byte[] message, java.util.Map attrMap) throws java.lang.Exception
I_ChangePublisher
publish
in interface I_ChangePublisher
changeKey
- Can be used to create the topic namemessage
- The message content to sendattrMap
- An optional map with attributes or null
java.lang.Exception
- On sending problemspublic boolean registerAlertListener(I_Update update, java.util.Map attrs) throws java.lang.Exception
I_ChangePublisher
This 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_ChangePublisher
update
- 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_ChangePublisher
Can be called multiple times if instance is reused from different plugins.
shutdown
in interface I_ChangePublisher
shutdown
in interface I_ContribPlugin
I_Plugin
public java.util.Set getUsedPropertyKeys()
I_ContribPlugin
getUsedPropertyKeys
in interface I_ContribPlugin
public void timeout(java.lang.Object userData)
org.xmlBlaster.util.I_Timeout
timeout
in interface org.xmlBlaster.util.I_Timeout
userData
- You get bounced back your userData which you passed
with Timeout.addTimeoutListener()public static void main(java.lang.String[] args)
|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |