Class JChannelProbeHandler

java.lang.Object
org.jgroups.JChannelProbeHandler
All Implemented Interfaces:
DiagnosticsHandler.ProbeHandler
Direct Known Subclasses:
NonReflectiveProbeHandler

public class JChannelProbeHandler extends Object implements DiagnosticsHandler.ProbeHandler
An implementation of a DiagnosticsHandler.ProbeHandler for JChannel
Since:
4.0
Author:
Bela Ban
  • Field Details

  • Constructor Details

    • JChannelProbeHandler

      public JChannelProbeHandler(JChannel ch)
  • Method Details

    • channel

      public JChannel channel()
    • channel

      public void channel(JChannel ch)
    • log

      public Log log()
    • log

      public void log(Log log)
    • handleProbe

      public Map<String,String> handleProbe(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 interface DiagnosticsHandler.ProbeHandler
      Returns:
      A map of sring keys and values. A null return value is permissible.
    • supportedKeys

      public String[] supportedKeys()
      Description copied from interface: DiagnosticsHandler.ProbeHandler
      Returns a list of supported keys
      Specified by:
      supportedKeys in interface DiagnosticsHandler.ProbeHandler
    • enable

      protected static String enable(int type, boolean flag)
    • resetAllStats

      protected JChannel resetAllStats()
    • dumpAttrsAllProtocols

      protected Map<String, Map<String,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 Map<String, Map<String,Object>> dumpAttrsSelectedProtocol(String protocol_name, List<String> attrs)
      Dumps attributes and their values of a given protocol.
      Parameters:
      protocol_name - The name of the protocol
      attrs - 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(Map<String,String> map, String input)
    • listOperations

      protected void listOperations(Map<String,String> map, String key)
    • listAllOperations

      protected static String listAllOperations(Collection<?> objects)
    • handleOperation

      protected void handleOperation(Map<String,String> map, String operation) throws 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:
      Exception
    • findMethod

      protected Method findMethod(Protocol prot, String method_name, String[] args) throws Exception
      Throws:
      Exception
    • handleAttrWrite

      protected void handleAttrWrite(String protocol_name, String attr_name, String attr_value) throws Exception
      Throws:
      Exception
    • convert

      protected static void convert(Map<String, Map<String,Object>> in, Map<String,String> out)