Package org.jgroups
Class JChannelProbeHandler
- java.lang.Object
-
- org.jgroups.JChannelProbeHandler
-
- All Implemented Interfaces:
DiagnosticsHandler.ProbeHandler
- Direct Known Subclasses:
NonReflectiveProbeHandler
public class JChannelProbeHandler extends java.lang.Object implements DiagnosticsHandler.ProbeHandler
- Since:
- 4.0
- Author:
- Bela Ban
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
JChannelProbeHandler.ThreadEntry
-
Constructor Summary
Constructors Constructor Description JChannelProbeHandler(JChannel ch)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
convert(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> in, java.util.Map<java.lang.String,java.lang.String> out)
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 static java.lang.String
enable(int type, boolean flag)
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)
protected void
handleJmx(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String input)
protected void
handleOperation(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String operation)
Invokes an operation and puts the return value into mapjava.util.Map<java.lang.String,java.lang.String>
handleProbe(java.lang.String... keys)
Handles a probe.protected static java.lang.String
listAllOperations(java.util.Collection<?> objects)
protected void
listOperations(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String key)
protected JChannel
resetAllStats()
java.lang.String[]
supportedKeys()
Returns a list of supported keys
-
-
-
Constructor Detail
-
JChannelProbeHandler
public JChannelProbeHandler(JChannel ch)
-
-
Method Detail
-
handleProbe
public java.util.Map<java.lang.String,java.lang.String> handleProbe(java.lang.String... keys)
Description copied from interface:DiagnosticsHandler.ProbeHandler
Handles a probe. For each key that is handled, the key and its result should be in the returned map.- Specified by:
handleProbe
in interfaceDiagnosticsHandler.ProbeHandler
- Returns:
- Map
. A map of keys and values. A null return value is permissible.
-
supportedKeys
public java.lang.String[] supportedKeys()
Description copied from interface:DiagnosticsHandler.ProbeHandler
Returns a list of supported keys- Specified by:
supportedKeys
in interfaceDiagnosticsHandler.ProbeHandler
-
enable
protected static java.lang.String enable(int type, boolean flag)
-
resetAllStats
protected JChannel resetAllStats()
-
dumpAttrsAllProtocols
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 stack- 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)
Dumps attributes and their values of a given protocol.- 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
-
handleJmx
protected void handleJmx(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String input)
-
listOperations
protected void listOperations(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String key)
-
listAllOperations
protected static java.lang.String listAllOperations(java.util.Collection<?> objects)
-
handleOperation
protected void handleOperation(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String operation) throws java.lang.Exception
Invokes an operation and puts the return value into map- Parameters:
map
-operation
- Protocol.OperationName[args], e.g. STABLE.foo[arg1 arg2 arg3]- Throws:
java.lang.Exception
-
findMethod
protected java.lang.reflect.Method findMethod(Protocol prot, java.lang.String method_name, java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleAttrWrite
protected void handleAttrWrite(java.lang.String protocol_name, java.lang.String attr_name, java.lang.String attr_value) throws java.lang.Exception
- Throws:
java.lang.Exception
-
convert
protected static void convert(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> in, java.util.Map<java.lang.String,java.lang.String> out)
-
-