xmlBlaster 2.2.0 API

org.xmlBlaster.engine.admin.intern
Class MsgHandler

java.lang.Object
  extended by org.xmlBlaster.engine.admin.intern.MsgHandler
All Implemented Interfaces:
I_CommandHandler, I_Plugin

public final class MsgHandler
extends java.lang.Object
implements I_CommandHandler, I_Plugin

Implementation of administrative access to xmlBlaster messages.

Since:
0.79g
Author:
xmlBlaster@marcelruff.info

Field Summary
private  CommandManager commandManager
           
private  ServerScope glob
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
 
Constructor Summary
MsgHandler()
           
 
Method Summary
 MsgUnit[] get(AddressServer addressServer, java.lang.String sessionId, CommandWrapper cmd)
          Your plugin should process the command.
 java.lang.String getName()
          Get a human readable name of this filter implementation
 java.lang.String getType()
          Return plugin type for Plugin loader
 java.lang.String getVersion()
          Return plugin version for Plugin loader
 java.lang.String help()
           
 java.lang.String help(java.lang.String cmd)
           
 void init(Global glob, PluginInfo pluginInfo)
          This method is called by the PluginManager (enforced by I_Plugin).
 void initialize(ServerScope glob, CommandManager commandManager)
          This is called after creation of the plugin.
 java.lang.String set(AddressServer addressServer, java.lang.String sessionId, CommandWrapper cmd)
          Set a value.
 void shutdown()
          Cleans up the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private java.lang.String ME

glob

private ServerScope glob

log

private static java.util.logging.Logger log

commandManager

private CommandManager commandManager
Constructor Detail

MsgHandler

public MsgHandler()
Method Detail

initialize

public void initialize(ServerScope glob,
                       CommandManager commandManager)
This is called after creation of the plugin.

Specified by:
initialize in interface I_CommandHandler
Parameters:
glob - The Global handle of this xmlBlaster server instance.
commandManager - My big brother taking care of me

init

public void init(Global glob,
                 PluginInfo pluginInfo)
This method is called by the PluginManager (enforced by I_Plugin).

Specified by:
init in interface I_Plugin
See Also:
I_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)

getType

public java.lang.String getType()
Return plugin type for Plugin loader

Specified by:
getType in interface I_Plugin
Returns:
"MsgHandler"

getVersion

public java.lang.String getVersion()
Return plugin version for Plugin loader

Specified by:
getVersion in interface I_Plugin
Returns:
"1.0"

getName

public java.lang.String getName()
Get a human readable name of this filter implementation

Returns:
"MsgHandler"

get

public MsgUnit[] get(AddressServer addressServer,
                     java.lang.String sessionId,
                     CommandWrapper cmd)
              throws XmlBlasterException
Description copied from interface: I_CommandHandler
Your plugin should process the command.

Specified by:
get in interface I_CommandHandler
Parameters:
addressServer - The protocol plugin or external access layer calling us
sessionId - Is null if not logged in
cmd - The command to process, e.g. "clientList"
Returns:
An array of MsgUnitRaw object:
  • Internal message are delivered as is, please don't manipulate them
  • System properties and internal state queries are marked with msgUnit.getQos() == "text/plain" and the key contains the plain key and the content the plain value. The MsgUnitRaw is just misused to carry the key/value data.
Throws:
XmlBlasterException
See Also:
org.xmlBlaster.engine.admin.I_CommandHandler#get(String,CommandWrapper)

set

public java.lang.String set(AddressServer addressServer,
                            java.lang.String sessionId,
                            CommandWrapper cmd)
                     throws XmlBlasterException
Set a value.

Specified by:
set in interface I_CommandHandler
Parameters:
sessionId - Is null if not logged in
cmd - "/node/heron/topic/HelloMsgOid/?content=World"
addressServer - The protocol plugin or external access layer calling us
Returns:
null if not set
Throws:
XmlBlasterException
See Also:
command requirement

help

public java.lang.String help()
Specified by:
help in interface I_CommandHandler

help

public java.lang.String help(java.lang.String cmd)
Specified by:
help in interface I_CommandHandler

shutdown

public void shutdown()
Description copied from interface: I_Plugin
Cleans up the resource.

Specified by:
shutdown in interface I_CommandHandler
Specified by:
shutdown in interface I_Plugin

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.