|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.Global org.xmlBlaster.engine.ServerScope
public final class ServerScope
This holds global needed data of one xmlBlaster instance.
Constructor Summary | |
---|---|
ServerScope()
|
|
ServerScope(java.util.Properties p,
boolean loadPropFile)
|
|
ServerScope(java.lang.String[] args)
One instance of this represents one xmlBlaster server. |
Method Summary | |
---|---|
DispatchConnectionsHandler |
createServerDispatchConnectionsHandler(ServerDispatchManager dispatchManager)
Returns the callback layer implementation 'CbDispatchConnectionsHandler' on server side. |
void |
doStorageCleanup(JdbcQueue jdbcQueue)
|
void |
finalize()
|
I_Authenticate |
getAuthenticate()
|
CbProtocolManager |
getCbProtocolManager()
Initialize cb protocol manager. |
ClusterManager |
getClusterManager()
Access instance which manages myself in a cluster environment. |
ClusterManager |
getClusterManager(SessionInfo sessionInfo)
Initialize the instance which manages myself in a cluster environment. |
ClusterManager |
getClusterManagerNoEx()
|
CommandManager |
getCommandManager()
Access instance of remote command administration manager. |
CommandManager |
getCommandManager(SessionInfo sessionInfo)
Initialize instance of remote command administration manager. |
ContextNode |
getContextNode()
The unique name of this xmlBlaster server instance. |
java.lang.String |
getDump()
|
void |
getDump(java.io.OutputStream out)
|
I_EntryFactory |
getEntryFactory()
The factory creating queue or msgUnitStore entries from persistent store. |
java.lang.String |
getId()
Access the unique cluster node id (as a String). |
java.lang.String |
getInstanceId()
Unique id of the xmlBlaster server, changes on each restart. |
SessionInfo |
getInternalSessionInfo()
|
java.lang.String |
getLogPrefix()
Returns for no cluster an empty string, in cluster environment if more than one node is known it returns the node id like "/node/heron". |
java.lang.String |
getLogPrefixDashed()
Same as getLogPrefix() but if in cluster environment a "-" is prefixed like "-/node/heron/". |
java.lang.String |
getLogPrefixDashed(java.lang.String post)
Returns for no cluster the given post string. |
MomClientGateway |
getMomClientGateway()
Access handler to forward messages beginning with "__cmd:" (administrative messages) |
MsgDistributorPluginManager |
getMsgDistributorPluginManager()
|
MsgFileDumper |
getMsgFileDumper()
A helper to dump a message to a file. |
java.lang.String |
getName()
A human readable name of the listener for logging. |
NodeId |
getNodeId()
The unique name of this xmlBlaster server instance. |
PluginHolder |
getPluginHolder()
gets the object holding all configuration information for the plugins (both for statically loaded plugins (by the run level manager) and dynamically loaded plugins (such plugins loaded on client request). |
RequestBroker |
getRequestBroker()
|
int |
getRunlevel()
|
RunlevelManager |
getRunlevelManager()
Initialize runlevel manager used to start/stop xmlBlaster with different run levels. |
Timeout |
getSessionTimer()
Access the handle of the user session timer thread. |
StoragePluginManager |
getStoragePluginManager()
|
SubjectEntryShuffler |
getSubjectInfoShuffler()
|
Timeout |
getTelnetSessionTimer()
Access the handle of the TopicHandler timer thread. |
TopicAccessor |
getTopicAccessor()
The singleton to handle all topics and its access. |
Timeout |
getTopicTimer()
Access the handle of the TopicHandler timer thread. |
boolean |
hasTelnetSessionTimer()
|
int |
init(java.lang.String[] args)
Calls super.init and checks the environment for "cluster.node.id" See private org.xmlBlaster.Main#createNodeId() |
private void |
initThis()
|
boolean |
isAdministrationCommand(XmlKey xmlKey)
|
boolean |
isClusterManagerReady()
Since v1.1 the clusterManager is loaded via xmlBlasterPlugins.xml See useCluster() to check if clustering is switched on First checks if ClusterManager is loaded already and if its state is ready. |
boolean |
isEmbedded()
If property -xmlBlaster.isEmbedded true is set we return true here An embedded server should not do any exit() |
boolean |
isServerSide()
Check where we are, on client or on server side? util.Global returns false |
java.lang.String[] |
peekMessages(I_Queue queue,
int numOfEntries,
java.lang.String label,
boolean forceReadableTimestamp,
boolean forceReadableBase64)
|
java.lang.String[] |
peekQueueMessagesToFile(I_Queue queue,
int numOfEntries,
java.lang.String path,
java.lang.String label)
Dumps given amount of messages from queue to file. |
void |
registerMomClientGateway(MomClientGateway momClientGateway)
Invoked by CommandManager to register message command handler |
void |
removeTelnetSessionTimer()
|
void |
runlevelChange(int from,
int to,
boolean force)
Invoked on run level change, see RunlevelManager.RUNLEVEL_HALTED and RunlevelManager.RUNLEVEL_RUNNING Enforced by I_RunlevelListener |
void |
setAuthenticate(I_Authenticate auth)
Sets the authentication in the engine.Global scope. |
void |
setClusterManager(ClusterManager clusterManager)
Implicitely sets useCluster to true |
void |
setId(java.lang.String id)
Currently set by enging.Global, used server side only. |
void |
setInternalSessionInfo(SessionInfo internalSessionInfo)
Filled by RequestBroker.java |
void |
setRequestBroker(RequestBroker requestBroker)
|
void |
setTopicAccessor(TopicAccessor topicAccessor)
|
void |
setUseCluster(boolean useCluster)
|
void |
shutdown()
|
boolean |
supportAdministrative()
|
java.lang.String |
usage()
Command line usage. |
boolean |
useAdminManager()
|
boolean |
useCluster()
Is cluster support switched on? |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.logging.Logger log
private volatile RunlevelManager runlevelManager
private int currRunlevel
private I_Authenticate authenticate
private RequestBroker requestBroker
private NodeId nodeId
private volatile java.lang.String instanceId
private volatile ClusterManager clusterManager
private volatile Timeout sessionTimer
private volatile Timeout topicTimer
private volatile Timeout telnetSessionTimer
private boolean useCluster
private boolean firstUseCluster
private volatile CbProtocolManager cbProtocolManager
private volatile StoragePluginManager topicStorePluginManager
private volatile CommandManager commandManager
private boolean useAdminManager
private boolean firstUseAdminManager
private MomClientGateway momClientGateway
private volatile MsgFileDumper msgFileDumper
private PluginHolder pluginHolder
private volatile MsgDistributorPluginManager msgDistributorPluginManager
private SubjectEntryShuffler subjectEntryShuffler
private SessionInfo internalSessionInfo
private TopicAccessor topicAccessor
Constructor Detail |
---|
public ServerScope()
public ServerScope(java.lang.String[] args)
args
- Environment arguments (key/value pairs)public ServerScope(java.util.Properties p, boolean loadPropFile)
Method Detail |
---|
public void finalize()
finalize
in class Global
public void shutdown()
shutdown
in class Global
public int init(java.lang.String[] args)
init
in class Global
private void initThis()
public boolean isServerSide()
isServerSide
in class Global
public final ContextNode getContextNode()
getContextNode
in class Global
public java.lang.String getInstanceId()
getInstanceId
in class Global
public final NodeId getNodeId()
getNodeId
in class Global
public final java.lang.String getId()
getId
in class Global
public final void setId(java.lang.String id)
Global
setId
in class Global
public final RunlevelManager getRunlevelManager()
public int getRunlevel()
getRunlevel
in class Global
public void setUseCluster(boolean useCluster)
public void setClusterManager(ClusterManager clusterManager)
clusterManager
- public final boolean isClusterManagerReady()
public final ClusterManager getClusterManager() throws XmlBlasterException
XmlBlasterException
public final ClusterManager getClusterManagerNoEx()
public final boolean useCluster()
public final java.lang.String getLogPrefix()
getLogPrefix
in class Global
public final java.lang.String getLogPrefixDashed(java.lang.String post)
post
- the postfix string like "client"public final java.lang.String getLogPrefixDashed()
getLogPrefixDashed
in class Global
public final ClusterManager getClusterManager(SessionInfo sessionInfo) throws XmlBlasterException
An
- internal sessionInfo instance, see RequestBroker.
XmlBlasterException
public final CbProtocolManager getCbProtocolManager() throws XmlBlasterException
To administer CORBA/RMI etc. plugins
XmlBlasterException
public final void doStorageCleanup(JdbcQueue jdbcQueue)
doStorageCleanup
in class Global
public final StoragePluginManager getStoragePluginManager()
public final MsgFileDumper getMsgFileDumper() throws XmlBlasterException
XmlBlasterException
public final Timeout getSessionTimer()
public final Timeout getTopicTimer()
public final Timeout getTelnetSessionTimer()
public final boolean hasTelnetSessionTimer()
public final void removeTelnetSessionTimer()
public I_EntryFactory getEntryFactory()
getEntryFactory
in class Global
public final CommandManager getCommandManager() throws XmlBlasterException
XmlBlasterException
public final boolean useAdminManager()
public final CommandManager getCommandManager(SessionInfo sessionInfo) throws XmlBlasterException
An
- internal sessionInfo instance, see RequestBroker.
XmlBlasterException
public final MomClientGateway getMomClientGateway()
public final boolean supportAdministrative()
public final void registerMomClientGateway(MomClientGateway momClientGateway)
public final boolean isAdministrationCommand(XmlKey xmlKey) throws XmlBlasterException
XmlBlasterException
public DispatchConnectionsHandler createServerDispatchConnectionsHandler(ServerDispatchManager dispatchManager) throws XmlBlasterException
XmlBlasterException
public void setAuthenticate(I_Authenticate auth)
Additionally the I_Authentication is registered in the util.Global.addObjectEntry
under the name "/xmlBlaster/I_Authenticate" (see Constants.I_AUTHENTICATE_PROPERTY_KEY).
This allows lookup similar to a naming service if we are in the same JVM.
public I_Authenticate getAuthenticate()
public final MsgDistributorPluginManager getMsgDistributorPluginManager()
public void setRequestBroker(RequestBroker requestBroker)
public RequestBroker getRequestBroker()
public java.lang.String getName()
getName
in interface I_RunlevelListener
public void runlevelChange(int from, int to, boolean force) throws XmlBlasterException
runlevelChange
in interface I_RunlevelListener
from
- The current runlevelto
- The runlevel we want to switch toforce
- If true force the change even if messages are lost
XmlBlasterException
public boolean isEmbedded()
public java.lang.String getDump() throws XmlBlasterException
XmlBlasterException
public void getDump(java.io.OutputStream out) throws XmlBlasterException
XmlBlasterException
public PluginHolder getPluginHolder() throws XmlBlasterException
XmlBlasterException
public SubjectEntryShuffler getSubjectInfoShuffler()
public java.lang.String[] peekMessages(I_Queue queue, int numOfEntries, java.lang.String label, boolean forceReadableTimestamp, boolean forceReadableBase64) throws XmlBlasterException
XmlBlasterException
public java.lang.String[] peekQueueMessagesToFile(I_Queue queue, int numOfEntries, java.lang.String path, java.lang.String label) throws XmlBlasterException
peekQueueMessagesToFile
in class Global
queue
- The queue to observenumOfEntries
- Maximum number of messages to dumppath
- The path to dump the messages to, it is automatically created if missing.label
- A nice queue name for logging/exceptions
XmlBlasterException
public java.lang.String usage()
java -Dproperty.verbose 2 ... java org.xmlBlaster.Main -property.verbose 2
usage
in class Global
public SessionInfo getInternalSessionInfo()
public void setInternalSessionInfo(SessionInfo internalSessionInfo)
internalSessionInfo
- public TopicAccessor getTopicAccessor()
public void setTopicAccessor(TopicAccessor topicAccessor)
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |