Package org.jgroups.stack
Class NonReflectiveProbeHandler
- java.lang.Object
-
- org.jgroups.JChannelProbeHandler
-
- org.jgroups.stack.NonReflectiveProbeHandler
-
- All Implemented Interfaces:
DiagnosticsHandler.ProbeHandler
public class NonReflectiveProbeHandler extends JChannelProbeHandler
ADiagnosticsHandler.ProbeHandler
that does not use reflection. Can be used instead of the default ProbeHandler for commands "jmx" and "op"- Since:
- 4.1.0
- Author:
- Bela Ban
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgroups.JChannelProbeHandler
JChannelProbeHandler.ThreadEntry
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,ResourceDMBean.Accessor>>
attrs
protected static java.util.function.Predicate<java.lang.reflect.AccessibleObject>
FILTER
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,ResourceDMBean.MethodAccessor>>
operations
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,ResourceDMBean.Accessor>>
setters
-
Fields inherited from class org.jgroups.JChannelProbeHandler
ch, log
-
-
Constructor Summary
Constructors Constructor Description NonReflectiveProbeHandler(JChannel ch)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
dump()
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>
dumpAttrsAllProtocols()
Dumps the attributes and their values of _all_ protocols in a stackprotected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>
dumpAttrsSelectedProtocol(java.lang.String protocol_name, java.util.List<java.lang.String> attrs)
Dumps attributes and their values of a given protocol.protected java.lang.reflect.Method
findMethod(Protocol prot, java.lang.String method_name, java.lang.String[] args)
protected void
handleAttrWrite(java.lang.String protocol_name, java.lang.String attr_name, java.lang.String attr_value)
NonReflectiveProbeHandler
initialize(java.util.Collection<Protocol> prots)
NonReflectiveProbeHandler
initialize(Protocol[] protocols)
protected static void
invoke(java.lang.String protocol_name, ResourceDMBean.Accessor setter, java.lang.String attr, java.lang.Object value)
-
Methods inherited from class org.jgroups.JChannelProbeHandler
convert, enable, handleJmx, handleOperation, handleProbe, listAllOperations, listOperations, resetAllStats, supportedKeys
-
-
-
-
Field Detail
-
attrs
protected final java.util.Map<java.lang.String,java.util.Map<java.lang.String,ResourceDMBean.Accessor>> attrs
-
setters
protected final java.util.Map<java.lang.String,java.util.Map<java.lang.String,ResourceDMBean.Accessor>> setters
-
operations
protected final java.util.Map<java.lang.String,java.util.Map<java.lang.String,ResourceDMBean.MethodAccessor>> operations
-
FILTER
protected static final java.util.function.Predicate<java.lang.reflect.AccessibleObject> FILTER
-
-
Constructor Detail
-
NonReflectiveProbeHandler
public NonReflectiveProbeHandler(JChannel ch)
-
-
Method Detail
-
initialize
public NonReflectiveProbeHandler initialize(Protocol[] protocols)
-
initialize
public NonReflectiveProbeHandler initialize(java.util.Collection<Protocol> prots)
-
dump
public java.lang.String dump()
-
dumpAttrsAllProtocols
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> dumpAttrsAllProtocols()
Description copied from class:JChannelProbeHandler
Dumps the attributes and their values of _all_ protocols in a stack- Overrides:
dumpAttrsAllProtocols
in classJChannelProbeHandler
- Returns:
- A map of protocol names as keys and maps (of attribute names and values) as values
-
dumpAttrsSelectedProtocol
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> dumpAttrsSelectedProtocol(java.lang.String protocol_name, java.util.List<java.lang.String> attrs)
Description copied from class:JChannelProbeHandler
Dumps attributes and their values of a given protocol.- Overrides:
dumpAttrsSelectedProtocol
in classJChannelProbeHandler
- Parameters:
protocol_name
- The name of the protocolattrs
- A list of attributes that need to be returned. If null, all attributes of the given protocol will be returned- Returns:
- A map of protocol names as keys and maps (of attribute names and values) as values
-
handleAttrWrite
protected void handleAttrWrite(java.lang.String protocol_name, java.lang.String attr_name, java.lang.String attr_value)
- Overrides:
handleAttrWrite
in classJChannelProbeHandler
-
findMethod
protected java.lang.reflect.Method findMethod(Protocol prot, java.lang.String method_name, java.lang.String[] args) throws java.lang.Exception
- Overrides:
findMethod
in classJChannelProbeHandler
- Throws:
java.lang.Exception
-
invoke
protected static void invoke(java.lang.String protocol_name, ResourceDMBean.Accessor setter, java.lang.String attr, java.lang.Object value)
-
-