/** * Adds an invocation handler for the named subsystem to the invoker we * manage, and sets the mbean server on the invocation handler. * * @return Previous ServerInvocatioHandler with the same subsystem value (case insensitive) or null if one did not previously exist. * @jmx.managed-operation description = "Add a subsystem invocation handler to the ServerInvoker * we wrap, identified by the subsystem parameter." * impact = "ACTION" * @jmx.managed-parameter name = "subsystem" * type = "java.lang.String" * description = "The subsystem this handler is for." * @jmx.managed-parameter name = "handler" * type = "org.jboss.remoting.ServerInvocationHandler" * description = "The ServerInvocationHandler we are registering * for the subsystem" */ public ServerInvocationHandler addInvocationHandler(String subsystem, ServerInvocationHandler handler) throws Exception { if (invoker == null) { throw new IllegalStateException("You may only add handlers once the Connector is created (via create() method)."); } handler.setMBeanServer(server); return invoker.addInvocationHandler(subsystem, handler); }