Class CommandHandlerManager

java.lang.Object
org.jolokia.service.jmx.api.CommandHandlerManager

public class CommandHandlerManager extends Object
A request handler manager is responsible for managing so called "request handlers" which are used to dispatch for all command types known to the Jolokia protocol. Its main purpose is to keep a mapping between request types and the handler which can deal with that request type.
Since:
Nov 13, 2009
Author:
roland
  • Constructor Details

    • CommandHandlerManager

      public CommandHandlerManager(org.jolokia.server.core.service.api.JolokiaContext pCtx)
      Manager and dispatcher for incoming requests
      Parameters:
      pCtx - jolokia context
    • CommandHandlerManager

      public CommandHandlerManager(org.jolokia.server.core.service.api.JolokiaContext pCtx, String pProvider)
      Constructor, which creates the manager. This object can be used as a singleton since it doesnt keep a reference to a request being processed
      Parameters:
      pCtx - jolokia context for retrieving various services
      pProvider - provider to use for returned names. Certain handlers need this information for returning meta data with the proper provider prefixed.
  • Method Details

    • getCommandHandler

      public <R extends org.jolokia.server.core.request.JolokiaRequest> CommandHandler<R> getCommandHandler(org.jolokia.server.core.util.RequestType pType)
      Get the request handler for the given type
      Parameters:
      pType - type of request
      Returns:
      handler which can handle requests of the given type
    • destroy

      public void destroy() throws JMException
      Lifecycle method called when agent goes down
      Throws:
      JMException