public class CommandProcessor extends Object implements org.jboss.remoting.stream.StreamInvocationHandler
commands from remote clients.
This server invocation handler will delegate the actual execution of the commands to
command services located in the same
MBeanServer as this handler.
When this handler is given an invocation request, it determines the
ObjectName of the command service to delegate to by:
subsystem as the name of the
command service's subsystemcommand type to the
directory which looks up the command service that provides the command and
returns its nameThis handler will delegate the command to that service's execute method and will return its return value as-is back to this invocation handler's client.
| Constructor and Description |
|---|
CommandProcessor()
Constructor for
CommandProcessor. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommandListener(CommandListener listener)
Adds the given listener to this object's list of command listeners.
|
void |
addListener(org.jboss.remoting.callback.InvokerCallbackHandler callbackHandler) |
CommandProcessorMetrics |
getCommandProcessorMetrics()
Returns the metrics object which contains all statistics for the command processor.
|
Object |
handleStream(InputStream in,
org.jboss.remoting.InvocationRequest invocation)
Handles incoming stream data from a client request that used the JBoss/Remoting streaming API.
|
Object |
invoke(org.jboss.remoting.InvocationRequest invocation)
Invokes the
Command that is found in the invocation parameter. |
void |
removeCommandListener(CommandListener listener)
Removes the given listener from this object's list of command listeners.
|
void |
removeListener(org.jboss.remoting.callback.InvokerCallbackHandler callbackHandler) |
void |
setCommandAuthenticator(CommandAuthenticator authenticator)
Sets the object that will perform the security checks necessary to authenticate incoming commands.
|
void |
setInvoker(org.jboss.remoting.ServerInvoker invoker) |
void |
setMBeanServer(MBeanServer mbs) |
public CommandProcessor()
CommandProcessor.public void setMBeanServer(MBeanServer mbs)
setMBeanServer in interface org.jboss.remoting.ServerInvocationHandlerServerInvocationHandler.setMBeanServer(javax.management.MBeanServer)public void setInvoker(org.jboss.remoting.ServerInvoker invoker)
setInvoker in interface org.jboss.remoting.ServerInvocationHandlerServerInvocationHandler.setInvoker(org.jboss.remoting.ServerInvoker)public void setCommandAuthenticator(CommandAuthenticator authenticator)
null, no security checks will be performed and all commands will be considered authenticated.authenticator - the object to perform authentication checks on all incoming commandspublic void addCommandListener(CommandListener listener)
listener - public void removeCommandListener(CommandListener listener)
listener - public CommandProcessorMetrics getCommandProcessorMetrics()
public Object invoke(org.jboss.remoting.InvocationRequest invocation) throws Throwable
Command that is found in the invocation parameter.
Note that the subsystem being invoked must be the subsystem where the
command service to be invoked is registered.invoke in interface org.jboss.remoting.ServerInvocationHandlerThrowableServerInvocationHandler.invoke(org.jboss.remoting.InvocationRequest)public Object handleStream(InputStream in, org.jboss.remoting.InvocationRequest invocation) throws Throwable
handleStream in interface org.jboss.remoting.stream.StreamInvocationHandlerThrowableStreamInvocationHandler.handleStream(InputStream, InvocationRequest)public void addListener(org.jboss.remoting.callback.InvokerCallbackHandler callbackHandler)
addListener in interface org.jboss.remoting.ServerInvocationHandlerServerInvocationHandler.addListener(InvokerCallbackHandler)public void removeListener(org.jboss.remoting.callback.InvokerCallbackHandler callbackHandler)
removeListener in interface org.jboss.remoting.ServerInvocationHandlerServerInvocationHandler.removeListener(InvokerCallbackHandler)Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.