|
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.contrib.GlobalInfo
org.xmlBlaster.contrib.replication.impl.ReplManagerPlugin
public class ReplManagerPlugin
ReplManagerPlugin is a plugin wrapper if you want to run DbWatcher inside xmlBlaster.
DbWatcher checks a database for changes and publishes these to the MoM This plugin needs to be registered in xmlBlasterPlugins.xml to be available on xmlBlaster server startup.This plugin uses java.util.logging and redirects the logging to xmlBlasters default logging framework. You can switch this off by setting the attribute xmlBlaster/jdk14loggingCapture to false.
Nested Class Summary | |
---|---|
private class |
ReplManagerPlugin.Counter
|
Field Summary | |
---|---|
private java.lang.String |
cachedListOfReplications
|
private java.util.Map |
counterMap
|
private java.util.Set |
initialDataTopicSet
|
private java.lang.String |
initialFilesLocation
|
private boolean |
initialized
|
private java.lang.String |
instanceName
|
private static java.util.logging.Logger |
log
|
private int |
maxNumOfEntries
|
private long |
maxResponseEntries
|
private long |
maxSize
|
private java.lang.Object |
mbeanHandle
|
private static java.lang.String |
ME
|
private long |
numRefresh
|
private java.lang.String |
password
|
private I_Info |
persistentInfo
|
private I_DbPool |
pool
|
private java.util.Map |
replications
|
private java.util.Map |
replSlaveMap
|
private static java.lang.String |
SENDER_SESSION
|
static java.lang.String |
SESSION_ID
|
private boolean |
shutdown
|
private java.util.Map |
sqlStatementMap
Keys are requestId Strings, and values are SqlStatement objects |
private java.lang.String |
sqlTopic
|
private static long |
STATUS_POLLER_INTERVAL_DEFAULT
|
private long |
statusPollerInterval
|
private long |
statusProcessingTime
|
private Timeout |
timeout
|
private Timestamp |
timeoutHandle
|
private java.util.Map |
topicToPrefixMap
|
private VersionTransformerCache |
transformerCache
|
private java.lang.String |
user
|
Fields inherited from class org.xmlBlaster.contrib.GlobalInfo |
---|
global, LOWER_CASE, ORIGINAL_ENGINE_GLOBAL, pluginInfo, UNTOUCHED, UPPER_CASE |
Fields inherited from interface org.xmlBlaster.engine.I_SubscriptionListener |
---|
PRIO_01, PRIO_05, PRIO_10 |
Fields inherited from interface org.xmlBlaster.contrib.ContribConstants |
---|
FILE_DATE, FILENAME_ATTR, FILENAME_ATTR_OLD_FASHION, SUBDIR_ATTR, TIMESTAMP_ATTR, TOPIC_NAME |
Fields inherited from interface org.xmlBlaster.contrib.I_Info |
---|
ID, JMX_PREFIX |
Constructor Summary | |
---|---|
ReplManagerPlugin()
Default constructor, you need to call init() thereafter. |
Method Summary | |
---|---|
java.lang.String |
activateSlaveDispatchers(java.lang.String replPrefix)
|
void |
addDispatchManager(I_DispatchManager dispatchManager)
This method is invoked always so see sessionAdded javadoc. |
private void |
addIfNotSet(java.lang.String key,
java.lang.String defValue)
|
void |
broadcastSql(java.lang.String repl,
java.lang.String sql)
Executes either a query or an update. |
static java.io.File |
checkExistance(java.lang.String pathName)
|
void |
clearVersionCache()
|
java.lang.String |
collectInitialUpdates(java.lang.String replicationPrefix)
Sends a message to the initial updates to collect all requests of initial updates for this replPrefix. |
boolean |
doActivate(I_DispatchManager dispatchManager)
If there are new messages available in the queue, you get invoked here and are asked if you want to start a worker thread (from the thread pool) to start taking messages from the queue and send them over the remote connection. |
void |
doExecuteSchedulerJob(boolean open,
java.lang.String prefix,
java.lang.String dest)
|
protected void |
doInit(Global global,
PluginInfo pluginInfo)
|
private I_ReplSlave[] |
getAllSlaves()
|
static byte[] |
getContent(java.io.InputStream is)
|
long[] |
getCurrentTransactionCount(java.lang.String replPrefix)
|
private ServerScope |
getEngineGlobal(Global glob)
|
java.lang.String |
getInitialFilesLocation()
Returns the (default) initialFileLocation which is the directory where the initial data is stored in case you want to transfer it per file. |
java.lang.String |
getInstanceName()
|
I_AdminSession |
getMasterSession(java.lang.String replicationPrefix)
|
int |
getMaxNumOfEntries()
|
private int |
getMaxNumOfEntries(I_ReplSlave slave)
TODO implement this |
java.lang.String[] |
getMimeExtended()
Get the content MIME version number for which this plugin applies. |
java.lang.String[] |
getMimeTypes()
Get the content MIME types for which this plugin applies, "*" is for all mime types |
java.lang.String |
getName()
Get a human readable name of this filter implementation |
long |
getNumOfRefreshes()
Returns the number of refreshes occured (to get the status of the slaves). |
I_Info |
getPersistentInfo()
|
static java.lang.String |
getPluginName()
|
java.lang.Integer |
getPriority()
The priority by which it will be invoked. |
I_Info |
getReplicationInfo(java.lang.String replicationPrefix)
Gets the properties associated to this replication. |
java.lang.String |
getReplications()
Never returns null. |
I_AdminSession |
getSession(java.lang.String sessionId)
|
I_ReplSlave |
getSlave(java.lang.String name)
|
java.lang.String |
getSlaves()
Never returns null. |
long |
getStatusPollerInterval()
This method returns the polling interval for retrieval of the status data of the slaves which has to be retrieved asynchronously in order not to block the monitor. |
long |
getStatusProcessingTime()
Returns the time in milliseconds it took to retrieve all the status information for all the slaves. |
java.lang.String |
getType()
The plugin name as configured im xmlBlasterPlugins.xml |
java.lang.String |
getVersion()
The plugin version as configured in xmlBlasterPlugins.xml |
java.util.List<I_Entry> |
handleNextMessages(I_DispatchManager dispatchManager,
java.util.List<I_Entry> pushEntries)
If you returned true from doActivate() the worker thread will ask us to retrieve the next messages from the queue (dispatchManager.getQueue()). |
private boolean |
hasUsAsDispatchPlugin(ConnectQosServer connQos)
Convenience method to determine if a connect Qos is for us, i.e. |
void |
initialize(Global glob,
java.lang.String typeVersion)
Is called once only after the instance is created. |
void |
initialize(ServerScope glob)
This is called after instantiation of the plugin |
private I_DbPool |
initializePersistentInfo()
Creates a I_DbPool object using the defaults out of the JDBC,1.0 Queue Properties and initializes the pool. |
java.lang.String |
initiateReplication(java.lang.String slaveSessionName,
java.lang.String prefixWithVersion,
java.lang.String cascadeSlaveSessionName,
java.lang.String cascadeReplicationPrefix,
java.lang.String realInitialFilesLocation)
Intiates the replication for the given slave. |
java.lang.String |
initiateReplicationNonMBean(java.lang.String slaveSessionName,
java.lang.String prefixWithVersion,
java.lang.String cascadeSlaveSessionName,
java.lang.String cascadeReplicationPrefix,
java.lang.String realInitialFilesLocation)
Intiates the replication for the given slave. |
java.lang.String |
intercept(SubjectInfo publisher,
MsgUnit msgUnit)
Is only invoked when it is configured as a MimePlugin (to count messages containing several transactions). |
boolean |
isShutdown()
|
static void |
main(java.lang.String[] args)
|
private static void |
mainUsage()
|
void |
onDispatchWorkerException(I_DispatchManager dispatchManager,
java.lang.Throwable ex)
Invoked when the dispatching failed due to an exception. |
private static long |
parseLong(java.lang.String val,
long def)
|
void |
postHandleNextMessages(I_DispatchManager dispatchManager,
MsgUnit[] processedEntries)
Does cleanup, particularly it sets the status and counters. |
private java.lang.String |
processDeadLetter(UpdateQos qos)
|
private java.lang.String |
publishSimpleMessage(java.lang.String replicationPrefix,
java.lang.String msgTxt)
|
static long[] |
readOldReplData(I_Info persistentInfo,
java.lang.String propName)
|
private static long[] |
readOldReplDataOldStyle(I_Info persistentInfo,
java.lang.String propName)
Deprecated. |
java.lang.String |
recreateTriggers(java.lang.String replPrefix)
Recreates the triggers for the given replication source. |
void |
register(java.lang.String senderSession,
java.lang.String replicationPrefix,
I_Info info)
Used to register a dbWatcher. |
private void |
registerSqlStatement(java.lang.String replPrefix,
java.lang.String reqId,
java.lang.String statement)
|
java.lang.String |
reInitiate(java.lang.String replPrefix)
This will start an initial update for all slaves replicating from the specified replPrefix. |
void |
removeSqlStatement(java.lang.String statementId)
|
private void |
sendBroadcastRequest(java.lang.String replicationPrefix,
java.lang.String sql,
boolean isHighPrio,
java.lang.String requestId)
|
void |
sessionAdded(ClientEvent e)
The part of this code inherent to the slave could be moved to the addDispatchManager since that method would always invoked too. |
void |
sessionPreRemoved(ClientEvent e)
Invoked before a client does a logout |
void |
sessionRemoved(ClientEvent e)
Invoked when client does a logout |
void |
sessionUpdated(ClientEvent e)
Invoked on successful client re-login (interface I_ClientListener) |
private java.lang.String |
setDispatcher(boolean alive,
java.lang.String replPrefix)
|
(package private) void |
setEngineGlobalProperty(java.lang.String key,
java.lang.String val)
|
void |
setMaxNumOfEntries(int maxNumOfEntries)
|
void |
setStatusPollerInterval(long statusPollerInterval)
This method sets the polling interval for retrieval of the status data of the slaves which has to be retrieved asynchronously in order not to block the monitor. |
void |
shutdown()
Cleans up the resource. |
void |
shutdown(I_DispatchManager dispatchManager)
Deregister the given dispatchManager |
java.lang.String |
startBatchUpdate(java.lang.String replicationPrefix)
Sends a message to the initial updater for the replPrefix that it can start the initial update for all collected (registered) slaves. |
java.lang.String |
stopSlaveDispatchers(java.lang.String replPrefix)
|
static void |
storeReplData(I_Info persistentInfo,
java.lang.String propName,
long[] values)
|
void |
subjectAdded(ClientEvent e)
Invoked on first successful client login, when SubjectInfo is created |
void |
subjectRemoved(ClientEvent e)
Invoked when client does its last logout |
void |
subscriptionAdd(SubscriptionEvent e)
To make it simpler one could think to put this method together with sessionAdded. |
void |
subscriptionRemove(SubscriptionEvent e)
Invoked when subscription does a logout |
void |
timeout(java.lang.Object userData)
You will be notified about the timeout through this method. |
void |
toAlive(I_DispatchManager dispatchManager,
ConnectionStateEnum oldState)
|
void |
toAliveSync(I_DispatchManager dispatchManager,
ConnectionStateEnum oldState)
|
void |
toDead(I_DispatchManager dispatchManager,
ConnectionStateEnum oldState,
XmlBlasterException xmlBlasterException)
|
void |
toPolling(I_DispatchManager dispatchManager,
ConnectionStateEnum oldState)
|
java.lang.String |
toXml(java.lang.String extraOffset)
|
byte[] |
transformVersion(java.lang.String replPrefix,
java.lang.String destVersion,
java.lang.String destination,
byte[] content)
|
java.lang.String |
transformVersion(java.lang.String replPrefix,
java.lang.String destVersion,
java.lang.String destination,
java.lang.String is)
Performs a version transformation from one version to the other. |
byte[] |
transformVersion(java.lang.String replPrefix,
java.lang.String srcVersion,
java.lang.String destVersion,
java.lang.String destination,
byte[] srcData)
|
void |
unregister(java.lang.String senderSession,
java.lang.String replicationPrefix)
|
private void |
unregisterSqlStatement(java.lang.String reqId)
|
java.lang.String |
update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
It receives events from all ReplicationConverter instances which want to register themselves for administration of initial updates. |
java.lang.String |
usage()
|
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 |
Methods inherited from interface org.xmlBlaster.util.plugin.I_Plugin |
---|
init |
Field Detail |
---|
public static final java.lang.String SESSION_ID
private static final java.lang.String SENDER_SESSION
private static final java.lang.String ME
private static java.util.logging.Logger log
private java.lang.Object mbeanHandle
private java.lang.String user
private java.lang.String password
private java.util.Map replications
private java.util.Map replSlaveMap
private java.util.Map sqlStatementMap
private boolean shutdown
private volatile boolean initialized
private java.lang.String instanceName
private long maxSize
private java.lang.String sqlTopic
private long maxResponseEntries
private I_DbPool pool
private VersionTransformerCache transformerCache
private java.lang.String cachedListOfReplications
private java.lang.String initialFilesLocation
private Timestamp timeoutHandle
private Timeout timeout
private static final long STATUS_POLLER_INTERVAL_DEFAULT
private long statusPollerInterval
private long statusProcessingTime
private long numRefresh
private int maxNumOfEntries
private I_Info persistentInfo
private java.util.Map topicToPrefixMap
private java.util.Map counterMap
private java.util.Set initialDataTopicSet
Constructor Detail |
---|
public ReplManagerPlugin()
Method Detail |
---|
public byte[] transformVersion(java.lang.String replPrefix, java.lang.String srcVersion, java.lang.String destVersion, java.lang.String destination, byte[] srcData) throws java.lang.Exception
java.lang.Exception
public byte[] transformVersion(java.lang.String replPrefix, java.lang.String destVersion, java.lang.String destination, byte[] content) throws java.lang.Exception
java.lang.Exception
public java.lang.String transformVersion(java.lang.String replPrefix, java.lang.String destVersion, java.lang.String destination, java.lang.String is) throws java.lang.Exception
ReplManagerPluginMBean
transformVersion
in interface ReplManagerPluginMBean
replPrefix
- The replication prefix of the source to be used.destVersion
- The desidered version on the destinationdestination
- The session name of the destination.is
- The content of the data to be transformed
java.lang.Exception
public void clearVersionCache()
clearVersionCache
in interface ReplManagerPluginMBean
public I_ReplSlave getSlave(java.lang.String name)
name
- the slave associated with this name or null if none found.
public java.lang.String reInitiate(java.lang.String replPrefix)
ReplManagerPluginMBean
reInitiate
in interface ReplManagerPluginMBean
public java.lang.String getSlaves()
getSlaves
in interface ReplManagerPluginMBean
public java.lang.String getReplications()
getReplications
in interface ReplManagerPluginMBean
public static java.lang.String getPluginName()
public java.lang.String getType()
GlobalInfo
getType
in interface I_Plugin
getType
in class GlobalInfo
I_Plugin.getType()
public java.lang.String getVersion()
GlobalInfo
getVersion
in interface I_Plugin
getVersion
in class GlobalInfo
I_Plugin.getVersion()
private void addIfNotSet(java.lang.String key, java.lang.String defValue)
private I_DbPool initializePersistentInfo() throws java.lang.Exception
java.lang.Exception
public java.lang.String initiateReplication(java.lang.String slaveSessionName, java.lang.String prefixWithVersion, java.lang.String cascadeSlaveSessionName, java.lang.String cascadeReplicationPrefix, java.lang.String realInitialFilesLocation)
initiateReplication
in interface ReplManagerPluginMBean
slaveSessionName
- replicationKey
- This is the dbWatcher replication.prefix attribute.cascadeSlaveSessionName
- The Name of the session of the dbWriter to be used for the cascaded replication. Can be null.cascadedReplicationPrefix
- the prefix identifing the DbWatcher for the cascaded replication. Can be null.realInitialFilesLocation
- the file location where the initial dump is stored. If null or an empty String, then it
is assumed to be transfered the "normal" way, that is over the choosen communication protocol.public java.lang.String initiateReplicationNonMBean(java.lang.String slaveSessionName, java.lang.String prefixWithVersion, java.lang.String cascadeSlaveSessionName, java.lang.String cascadeReplicationPrefix, java.lang.String realInitialFilesLocation) throws java.lang.Exception
slaveSessionName
- replicationKey
- This is the dbWatcher replication.prefix attribute.cascadeSlaveSessionName
- The Name of the session of the dbWriter to be used for the cascaded replication. Can be null.cascadedReplicationPrefix
- the prefix identifing the DbWatcher for the cascaded replication. Can be null.realInitialFilesLocation
- the file location where the initial dump is stored. If null or an empty String, then it
is assumed to be transfered the "normal" way, that is over the choosen communication protocol.
java.lang.Exception
protected void doInit(Global global, PluginInfo pluginInfo) throws XmlBlasterException
doInit
in class GlobalInfo
global
- The global passed by the RunLevelManager, this is not the object owned by the plugin. It is the original global.
XmlBlasterException
I_Plugin.init(org.xmlBlaster.util.Global, org.xmlBlaster.util.plugin.PluginInfo)
private ServerScope getEngineGlobal(Global glob)
public void shutdown()
I_Plugin
shutdown
in interface I_PublishFilter
shutdown
in interface I_MsgDispatchInterceptor
shutdown
in interface I_Plugin
shutdown
in class GlobalInfo
I_Plugin.shutdown()
public I_Info getReplicationInfo(java.lang.String replicationPrefix)
replicationPrefix
-
public void register(java.lang.String senderSession, java.lang.String replicationPrefix, I_Info info)
senderSession
- The session requesting this registration. This is needed
to reply to the right requestor.replId
- info
- These are the Configuration of the DbWatcher, for example Table Names and so forth.public void unregister(java.lang.String senderSession, java.lang.String replicationPrefix)
public static byte[] getContent(java.io.InputStream is) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
private java.lang.String processDeadLetter(UpdateQos qos)
public java.lang.String update(java.lang.String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) throws XmlBlasterException
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.
XmlBlasterException
I_Callback.update(java.lang.String, org.xmlBlaster.client.key.UpdateKey, byte[], org.xmlBlaster.client.qos.UpdateQos)
public void addDispatchManager(I_DispatchManager dispatchManager)
addDispatchManager
in interface I_MsgDispatchInterceptor
org.xmlBlaster.util.dispatch.plugins.I_MsgDispatchInterceptor#addDispatchManager(org.xmlBlaster.util.dispatch.DispatchManager)
public java.lang.String getInstanceName()
public boolean doActivate(I_DispatchManager dispatchManager)
I_MsgDispatchInterceptor
if (dispatchManager.getDispatchConnectionsHandler().isPolling()) { return false; }
doActivate
in interface I_MsgDispatchInterceptor
org.xmlBlaster.util.dispatch.plugins.I_MsgDispatchInterceptor#doActivate(org.xmlBlaster.util.dispatch.DispatchManager)
private final int getMaxNumOfEntries(I_ReplSlave slave)
slave
- public java.util.List<I_Entry> handleNextMessages(I_DispatchManager dispatchManager, java.util.List<I_Entry> pushEntries) throws XmlBlasterException
I_MsgDispatchInterceptor
This is where this plugin comes in action. The plugin may filter the queue entries and for example only return high priority messages
Usually you take the message out of the queue and then invoke prepareMsgsFromQueue() to filter expired messages away and do a shallow copy of the messages to avoid that changes in the messages have impact on the original messages. See the following example:
// take messages from queue (none blocking) // we take all messages with same priority as a bulk ... ArrayList entryList = dispatchManager.getQueue().peekSamePriority(-1); // filter expired entries etc. ... // you should always call this method after taking messages from queue entryList = dispatchManager.prepareMsgsFromQueue(entryList); // ... do plugin specific work ... return entryList;
handleNextMessages
in interface I_MsgDispatchInterceptor
pushEntries
- null: Take messages yourself from queue (async mode) XmlBlasterException
org.xmlBlaster.util.dispatch.plugins.I_MsgDispatchInterceptor#handleNextMessages(org.xmlBlaster.util.dispatch.DispatchManager, java.util.ArrayList)
public void initialize(Global glob, java.lang.String typeVersion) throws XmlBlasterException
I_MsgDispatchInterceptor
initialize
in interface I_MsgDispatchInterceptor
XmlBlasterException
I_MsgDispatchInterceptor.initialize(org.xmlBlaster.util.Global, java.lang.String)
public boolean isShutdown()
isShutdown
in interface I_MsgDispatchInterceptor
I_MsgDispatchInterceptor.isShutdown()
public void shutdown(I_DispatchManager dispatchManager) throws XmlBlasterException
I_MsgDispatchInterceptor
shutdown
in interface I_MsgDispatchInterceptor
XmlBlasterException
org.xmlBlaster.util.dispatch.plugins.I_MsgDispatchInterceptor#shutdown(org.xmlBlaster.util.dispatch.DispatchManager)
public java.lang.String toXml(java.lang.String extraOffset)
toXml
in interface I_MsgDispatchInterceptor
extraOffset
- Indent the dump with given ASCII blanks
I_MsgDispatchInterceptor.toXml(java.lang.String)
public java.lang.String usage()
usage
in interface I_MsgDispatchInterceptor
I_MsgDispatchInterceptor.usage()
public void toAlive(I_DispatchManager dispatchManager, ConnectionStateEnum oldState)
toAlive
in interface I_ConnectionStatusListener
org.xmlBlaster.util.dispatch.I_ConnectionStatusListener#toAlive(org.xmlBlaster.util.dispatch.DispatchManager, org.xmlBlaster.util.dispatch.ConnectionStateEnum)
public void toAliveSync(I_DispatchManager dispatchManager, ConnectionStateEnum oldState)
toAliveSync
in interface I_ConnectionStatusListener
public void toDead(I_DispatchManager dispatchManager, ConnectionStateEnum oldState, XmlBlasterException xmlBlasterException)
toDead
in interface I_ConnectionStatusListener
xmlBlasterException
- Can be nullorg.xmlBlaster.util.dispatch.I_ConnectionStatusListener#toDead(org.xmlBlaster.util.dispatch.DispatchManager, org.xmlBlaster.util.dispatch.ConnectionStateEnum, XmlBlasterException)
public void toPolling(I_DispatchManager dispatchManager, ConnectionStateEnum oldState)
toPolling
in interface I_ConnectionStatusListener
org.xmlBlaster.util.dispatch.I_ConnectionStatusListener#toPolling(org.xmlBlaster.util.dispatch.DispatchManager, org.xmlBlaster.util.dispatch.ConnectionStateEnum)
private void registerSqlStatement(java.lang.String replPrefix, java.lang.String reqId, java.lang.String statement) throws java.lang.Exception
java.lang.Exception
private void unregisterSqlStatement(java.lang.String reqId)
public void removeSqlStatement(java.lang.String statementId)
removeSqlStatement
in interface ReplManagerPluginMBean
private void sendBroadcastRequest(java.lang.String replicationPrefix, java.lang.String sql, boolean isHighPrio, java.lang.String requestId) throws java.lang.Exception
java.lang.Exception
public void broadcastSql(java.lang.String repl, java.lang.String sql) throws java.lang.Exception
ReplManagerPluginMBean
broadcastSql
in interface ReplManagerPluginMBean
repl
- The replication to which to send the request.sql
- The sql statement to perform (can either be a query or an update).
java.lang.Exception
- if either the repl or sql was null.ReplManagerPluginMBean.broadcastSql(java.lang.String, java.lang.String)
private final boolean hasUsAsDispatchPlugin(ConnectQosServer connQos)
connQos
-
public void sessionAdded(ClientEvent e) throws XmlBlasterException
sessionAdded
in interface I_ClientListener
XmlBlasterException
I_ClientListener.sessionAdded(org.xmlBlaster.authentication.ClientEvent)
public void sessionUpdated(ClientEvent e) throws XmlBlasterException
sessionUpdated
in interface I_ClientListener
XmlBlasterException
public void sessionPreRemoved(ClientEvent e) throws XmlBlasterException
I_ClientListener
sessionPreRemoved
in interface I_ClientListener
XmlBlasterException
I_ClientListener.sessionPreRemoved(org.xmlBlaster.authentication.ClientEvent)
public void sessionRemoved(ClientEvent e) throws XmlBlasterException
I_ClientListener
sessionRemoved
in interface I_ClientListener
XmlBlasterException
I_ClientListener.sessionRemoved(org.xmlBlaster.authentication.ClientEvent)
public void subjectAdded(ClientEvent e) throws XmlBlasterException
I_ClientListener
subjectAdded
in interface I_ClientListener
XmlBlasterException
I_ClientListener.subjectAdded(org.xmlBlaster.authentication.ClientEvent)
public void subjectRemoved(ClientEvent e) throws XmlBlasterException
I_ClientListener
subjectRemoved
in interface I_ClientListener
XmlBlasterException
I_ClientListener.subjectRemoved(org.xmlBlaster.authentication.ClientEvent)
public java.lang.Integer getPriority()
I_SubscriptionListener
getPriority
in interface I_SubscriptionListener
I_SubscriptionListener.getPriority()
public void subscriptionAdd(SubscriptionEvent e) throws XmlBlasterException
subscriptionAdd
in interface I_SubscriptionListener
XmlBlasterException
I_SubscriptionListener.subscriptionAdd(org.xmlBlaster.engine.SubscriptionEvent)
public void subscriptionRemove(SubscriptionEvent e) throws XmlBlasterException
I_SubscriptionListener
subscriptionRemove
in interface I_SubscriptionListener
XmlBlasterException
I_SubscriptionListener.subscriptionRemove(org.xmlBlaster.engine.SubscriptionEvent)
void setEngineGlobalProperty(java.lang.String key, java.lang.String val)
public final java.lang.String recreateTriggers(java.lang.String replPrefix) throws java.lang.Exception
ReplManagerPluginMBean
recreateTriggers
in interface ReplManagerPluginMBean
replPrefix
- this is the same as specified in the configuration as 'replication.prefix' and it
identifies a replication source.
java.lang.Exception
public java.lang.String getInitialFilesLocation()
ReplManagerPluginMBean
getInitialFilesLocation
in interface ReplManagerPluginMBean
public static java.io.File checkExistance(java.lang.String pathName) throws java.lang.Exception
java.lang.Exception
private static void mainUsage()
public static void main(java.lang.String[] args)
public void timeout(java.lang.Object userData)
I_Timeout
timeout
in interface I_Timeout
userData
- You get bounced back your userData which you passed
with Timeout.addTimeoutListener()public long getStatusPollerInterval()
ReplManagerPluginMBean
getStatusPollerInterval
in interface ReplManagerPluginMBean
public long getNumOfRefreshes()
ReplManagerPluginMBean
getNumOfRefreshes
in interface ReplManagerPluginMBean
public void setStatusPollerInterval(long statusPollerInterval)
ReplManagerPluginMBean
setStatusPollerInterval
in interface ReplManagerPluginMBean
public long getStatusProcessingTime()
ReplManagerPluginMBean
getStatusProcessingTime
in interface ReplManagerPluginMBean
public void postHandleNextMessages(I_DispatchManager dispatchManager, MsgUnit[] processedEntries) throws XmlBlasterException
postHandleNextMessages
in interface I_MsgDispatchInterceptor
dispatchManager
- The used dispatch manager.processedEntries
- The entries which have been previously processed.
XmlBlasterException
public void onDispatchWorkerException(I_DispatchManager dispatchManager, java.lang.Throwable ex)
I_MsgDispatchInterceptor
onDispatchWorkerException
in interface I_MsgDispatchInterceptor
private java.lang.String publishSimpleMessage(java.lang.String replicationPrefix, java.lang.String msgTxt)
public java.lang.String startBatchUpdate(java.lang.String replicationPrefix)
ReplManagerPluginMBean
startBatchUpdate
in interface ReplManagerPluginMBean
public java.lang.String collectInitialUpdates(java.lang.String replicationPrefix)
ReplManagerPluginMBean
collectInitialUpdates
in interface ReplManagerPluginMBean
private final I_ReplSlave[] getAllSlaves()
private java.lang.String setDispatcher(boolean alive, java.lang.String replPrefix)
public java.lang.String activateSlaveDispatchers(java.lang.String replPrefix)
activateSlaveDispatchers
in interface ReplManagerPluginMBean
public java.lang.String stopSlaveDispatchers(java.lang.String replPrefix)
stopSlaveDispatchers
in interface ReplManagerPluginMBean
public I_Info getPersistentInfo()
public java.lang.String[] getMimeExtended()
I_PublishFilter
getMimeExtended
in interface I_PublishFilter
public java.lang.String[] getMimeTypes()
I_PublishFilter
getMimeTypes
in interface I_PublishFilter
public java.lang.String getName()
I_PublishFilter
getName
in interface I_PublishFilter
public void initialize(ServerScope glob)
I_PublishFilter
initialize
in interface I_PublishFilter
glob
- The Global handle of this xmlBlaster server instance.public java.lang.String intercept(SubjectInfo publisher, MsgUnit msgUnit) throws XmlBlasterException
intercept
in interface I_PublishFilter
publisher
- The subject object describing the publishermsgUnit
- The message to check
XmlBlasterException
- Is thrown on problems, for example if the MIME type
does not fit to message content.public long[] getCurrentTransactionCount(java.lang.String replPrefix)
private static long parseLong(java.lang.String val, long def)
public static long[] readOldReplData(I_Info persistentInfo, java.lang.String propName)
private static long[] readOldReplDataOldStyle(I_Info persistentInfo, java.lang.String propName)
persistentInfo
- propName
-
public static void storeReplData(I_Info persistentInfo, java.lang.String propName, long[] values)
public void setMaxNumOfEntries(int maxNumOfEntries)
setMaxNumOfEntries
in interface ReplManagerPluginMBean
public int getMaxNumOfEntries()
getMaxNumOfEntries
in interface ReplManagerPluginMBean
public I_AdminSession getSession(java.lang.String sessionId) throws java.lang.Exception
java.lang.Exception
public I_AdminSession getMasterSession(java.lang.String replicationPrefix) throws java.lang.Exception
java.lang.Exception
public void doExecuteSchedulerJob(boolean open, java.lang.String prefix, java.lang.String dest)
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |