|
xmlBlaster 1.6.4 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.contrib.GlobalInfo
org.xmlBlaster.contrib.filewriter.FileWriter
XmlBlaster plugin wrapper code. A plugin registration example (xmlBlasterPlugins.xml):
<plugin create='true' id='FileWriter'
className='org.xmlBlaster.contrib.filewriter.Receiver'>
<attribute id='mom.topicName'>fileWriterTopic</attribute>
<attribute id='connectQos'><![CDATA[
<qos>
<securityService type='htpasswd' version='1.0'>
<user>FileWriter</user>
<passwd>secret</passwd>
</securityService>
<session name='client/FileWriter/session/1' timeout='0' maxSessions='1'
clearSessions='true' reconnectSameClientOnly='false'/>
</qos>
]]>
</attribute>
<attribute id='directoryName'>${user.home}${file.separator}FileDumps</attribute>
<action do='LOAD' onStartupRunlevel='6' sequence='6'
onFail='resource.configuration.pluginFailed'/>
<action do='STOP' onShutdownRunlevel='5' sequence='6'/>
</plugin>
| Field Summary | |
private I_XmlBlasterAccess |
access
|
private FileWriterCallback |
callback
|
private ConnectQos |
connectQos
|
private Global |
global
|
private boolean |
isShutdown
used to identify if it has shut down (to get a new global) |
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
private boolean |
momAdministered
|
private java.lang.String |
name
only used as a default login name and logging |
private I_PluginConfig |
pluginConfig
|
private java.lang.String |
subscribeKey
|
private java.lang.String |
subscribeQos
|
| Fields inherited from class org.xmlBlaster.contrib.GlobalInfo |
LOWER_CASE, ORIGINAL_ENGINE_GLOBAL, pluginInfo, UNTOUCHED, UPPER_CASE |
| Fields inherited from interface org.xmlBlaster.contrib.I_Info |
ID, JMX_PREFIX |
| Constructor Summary | |
FileWriter()
|
|
FileWriter(Global globOrig,
java.lang.String name,
I_PluginConfig config)
|
|
| Method Summary | |
void |
doInit(Global glob,
PluginInfo info)
|
java.lang.String |
getType()
The plugin name as configured im xmlBlasterPlugins.xml |
java.lang.String |
getVersion()
The plugin version as configured in xmlBlasterPlugins.xml |
private void |
initConnection()
Connects to the xmlBlaster. |
private void |
prepareInit(Global globOrig,
I_PluginConfig config)
|
void |
shutdown()
If an exception occurs it means it could not publish the entry |
java.lang.String |
update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
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 org.xmlBlaster.contrib.GlobalInfo |
dump, get, getBoolean, getGlobal, getInt, getKeys, getLong, getObject, getObjectKeys, getOriginalGlobal, getRaw, getStrippedString, init, loadPlugin, put, putObject, putRaw, replaceAllEntries, setStrippedHostname |
| 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 global
private static java.util.logging.Logger log
private I_XmlBlasterAccess access
private ConnectQos connectQos
private java.lang.String subscribeKey
private java.lang.String subscribeQos
private FileWriterCallback callback
private boolean isShutdown
private java.lang.String name
private I_PluginConfig pluginConfig
private boolean momAdministered
| Constructor Detail |
public FileWriter()
public FileWriter(Global globOrig,
java.lang.String name,
I_PluginConfig config)
throws XmlBlasterException
| Method Detail |
private void prepareInit(Global globOrig,
I_PluginConfig config)
throws XmlBlasterException
XmlBlasterException
private void initConnection()
throws XmlBlasterException
XmlBlasterException
public void shutdown()
throws XmlBlasterException
shutdown in interface I_Pluginshutdown in class GlobalInfoXmlBlasterExceptionI_Plugin.shutdown()public java.lang.String getType()
GlobalInfo
getType in interface I_PlugingetType in class GlobalInfoI_Plugin.getType()public java.lang.String getVersion()
GlobalInfo
getVersion in interface I_PlugingetVersion in class GlobalInfoI_Plugin.getVersion()
public void doInit(Global glob,
PluginInfo info)
throws XmlBlasterException
doInit in class GlobalInfoglob - The global passed by the RunLevelManager, this is not the object owned by the plugin. It is the original global.info -
XmlBlasterException
public java.lang.String update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
throws XmlBlasterException
I_Callback
update in interface 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.
XmlBlasterExceptionI_XmlBlasterAccess
|
xmlBlaster 1.6.4 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||