public class LocalRequestDispatcher extends Object implements RequestDispatcher
MBeanServer.| Constructor and Description |
|---|
LocalRequestDispatcher(Converters pConverters,
Restrictor pRestrictor,
Configuration pConfig,
LogHandler pLogHandler)
Create a new local dispatcher which accesses local MBeans.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(JmxRequest pJmxRequest)
Check whether current dispatcher can handle the given request
|
void |
destroy()
Unregister the config MBean
|
Object |
dispatchRequest(JmxRequest pJmxReq)
Dispatch a
JmxRequest to a certain backend
and return the result of the JMX action. |
ServerHandle |
getServerHandle()
Get information about the current server
|
void |
initMBeans(HistoryStore pHistoryStore,
DebugStore pDebugStore)
Initialise this request dispatcher, which will register a
ConfigMBean for easy external
access to the HistoryStore and DebugStore. |
boolean |
useReturnValueWithPath(JmxRequest pJmxRequest)
Whether a return value should be returned directly, ignoring any path.
|
public LocalRequestDispatcher(Converters pConverters, Restrictor pRestrictor, Configuration pConfig, LogHandler pLogHandler)
pConverters - object/string converterspRestrictor - restrictor which checks the access for various operationspConfig - agent configurationpLogHandler - local handler used for logging out errors and warningspublic boolean canHandle(JmxRequest pJmxRequest)
canHandle in interface RequestDispatcherpJmxRequest - request to checkpublic boolean useReturnValueWithPath(JmxRequest pJmxRequest)
useReturnValueWithPath in interface RequestDispatcherpJmxRequest - request for getting the handlerpublic Object dispatchRequest(JmxRequest pJmxReq) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, NotChangedException
JmxRequest to a certain backend
and return the result of the JMX action.dispatchRequest in interface RequestDispatcherpJmxReq - the request to dispatchInstanceNotFoundException - when a certain MBean could not be foundAttributeNotFoundException - in case an attributes couldnt be resolvedReflectionExceptionMBeanExceptionNotChangedExceptionpublic void initMBeans(HistoryStore pHistoryStore, DebugStore pDebugStore) throws MalformedObjectNameException, MBeanRegistrationException, NotCompliantMBeanException
ConfigMBean for easy external
access to the HistoryStore and DebugStore. Also a JolokiaDiscoveryMBean
is registeredpHistoryStore - history store to be managed from within an MBeanpDebugStore - managed debug storeMalformedObjectNameException - if our MBean's name is wrong (which cannot happen)MBeanRegistrationException - if registration failsNotCompliantMBeanException - if we have a non compliant MBean (cannot happen, too)public void destroy()
throws JMException
JMException - if unregistration failspublic ServerHandle getServerHandle()
Copyright © 2019. All rights reserved.