Class ProtocolCommand


  • public class ProtocolCommand
    extends Object
    Represents a custom protocol action command as used by the Protocol.dispatch method.

    This class is used by custom protocol actions. For detailed information about custom protocol actions, please refer to the Protocol.dispatch and SmartInspect.dispatch methods.

    The public members of this class are threadsafe.

    • Constructor Detail

      • ProtocolCommand

        public ProtocolCommand​(int action,
                               Object state)
        Creates and initializes a new ProtocolCommand instance.
        Parameters:
        action - The custom protocol action to execute
        state - Optional object which provides additional information about the custom protocol action
    • Method Detail

      • getAction

        public int getAction()
        Returns the custom protocol action to execute. The return value of this method is protocol specific.
        Returns:
        The custom protocol action to execute
      • getState

        public Object getState()
        Returns the optional protocol command object which provides additional information about the custom protocol action. This method can return null.
        Returns:
        The optional protocol command object