Class Win2kSCAction

  • All Implemented Interfaces:
    PropertyAccessible

    public class Win2kSCAction
    extends java.lang.Object
    implements PropertyAccessible
    This class is strictly a data class. It holds the data corresponding to a specific service failure action for a service. It provides two properties - actionType and delay - and set/get methods for those properties. See the Win32 API documentation for the SC_ACTION structure for more detail.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SC_ACTION_NONE
      Value that can be used for the actionType property.
      static int SC_ACTION_REBOOT
      Value that can be used for the actionType property.
      static int SC_ACTION_RESTART
      Value that can be used for the actionType property.
      static int SC_ACTION_RUN_COMMAND
      Value that can be used for the actionType property.
    • Constructor Summary

      Constructors 
      Constructor Description
      Win2kSCAction()
      Constructs a new instance of a Win2kSCAction object with properties initialized to default values.
      Win2kSCAction​(int actionType, int delay)
      Constructs a new instance of a Win2kSCAction object using the actionType and delay passed in to initialize its properties.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getActionType()
      Returns the actionType property of this object.
      int getDelay()
      Returns the delay property of this object.
      void setActionType​(int actionType)
      Updates the actionType property of this object.
      void setDelay​(int delay)
      Sets the delay property for this object (in milliseconds).
      java.lang.String toString()
      Returns an English string that represents this object for display in the IDE.
      • Methods inherited from class java.lang.Object

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

      • SC_ACTION_NONE

        public static final int SC_ACTION_NONE
        Value that can be used for the actionType property.
        See Also:
        Constant Field Values
      • SC_ACTION_RESTART

        public static final int SC_ACTION_RESTART
        Value that can be used for the actionType property.
        See Also:
        Constant Field Values
      • SC_ACTION_REBOOT

        public static final int SC_ACTION_REBOOT
        Value that can be used for the actionType property.
        See Also:
        Constant Field Values
      • SC_ACTION_RUN_COMMAND

        public static final int SC_ACTION_RUN_COMMAND
        Value that can be used for the actionType property.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Win2kSCAction

        public Win2kSCAction()
        Constructs a new instance of a Win2kSCAction object with properties initialized to default values.
      • Win2kSCAction

        public Win2kSCAction​(int actionType,
                             int delay)
        Constructs a new instance of a Win2kSCAction object using the actionType and delay passed in to initialize its properties.
        Parameters:
        actionType - The actionType to assign to this object
        delay - The delay time for this action (in milliseconds)
    • Method Detail

      • toString

        public java.lang.String toString()
        Returns an English string that represents this object for display in the IDE.
        Overrides:
        toString in class java.lang.Object
      • setActionType

        public void setActionType​(int actionType)
        Updates the actionType property of this object. It should be one of:
        • SC_ACTION_NONE
        • SC_ACTION_RESTART
        • SC_ACTION_REBOOT
        • SC_ACTION_RUN_COMMAND
      • getActionType

        public int getActionType()
        Returns the actionType property of this object.
      • setDelay

        public void setDelay​(int delay)
        Sets the delay property for this object (in milliseconds).
        Parameters:
        delay - in milliseconds
      • getDelay

        public int getDelay()
        Returns the delay property of this object.