Class ProtocolCommand
- java.lang.Object
-
- com.gurock.smartinspect.protocols.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 Summary
Constructors Constructor Description ProtocolCommand(int action, Object state)Creates and initializes a new ProtocolCommand instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAction()Returns the custom protocol action to execute.ObjectgetState()Returns the optional protocol command object which provides additional information about the custom protocol action.
-
-
-
Constructor Detail
-
ProtocolCommand
public ProtocolCommand(int action, Object state)Creates and initializes a new ProtocolCommand instance.- Parameters:
action- The custom protocol action to executestate- 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
-
-