Package org.jgroups

Class JChannelProbeHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected JChannel ch  
      protected Log log  
    • 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 stack
      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.
      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 map
      java.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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        protected final Log log
    • 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 interface DiagnosticsHandler.ProbeHandler
        Returns:
        Map. A map of keys and values. A null return value is permissible.
      • 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 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​(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)