Winsvc.SERVICE_FAILURE_ACTIONS (JNA API)

com.sun.jna.platform.win32

## Class Winsvc.SERVICE_FAILURE_ACTIONS

- java.lang.Object
- - com.sun.jna.Structure
  - - com.sun.jna.platform.win32.Winsvc.ChangeServiceConfig2Info
    - - com.sun.jna.platform.win32.Winsvc.SERVICE_FAILURE_ACTIONS

- Direct Known Subclasses:
    Winsvc.SERVICE_FAILURE_ACTIONS.ByReference
  Enclosing interface:
    Winsvc

      public static class Winsvc.SERVICE_FAILURE_ACTIONS
      extends Winsvc.ChangeServiceConfig2Info

  Represents the action the service controller should take on each failure of a service. A service is considered failed when it terminates without reporting a status of SERVICE_STOPPED to the service controller. To configure additional circumstances under which the failure actions are to be executed, see SERVICE_FAILURE_ACTIONS_FLAG.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Winsvc.SERVICE_FAILURE_ACTIONS.ByReference`

    - ### Nested classes/interfaces inherited from class com.sun.jna.Structure

      `Structure.ByValue, Structure.StructField`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `cActions` The number of elements in the lpsaActions array.
    `int` | `dwResetPeriod` The time after which to reset the failure count to zero if there are no failures, in seconds.
    `static java.util.List<java.lang.String>` | `FIELDS`
    `java.lang.String` | `lpCommand` The command line of the process for the CreateProcess function to execute in response to the SC_ACTION_RUN_COMMAND service controller action.
    `java.lang.String` | `lpRebootMsg` The message to be broadcast to server users before rebooting in response to the SC_ACTION_REBOOT service controller action.
    `Winsvc.SC_ACTION.ByReference` | `lpsaActions` A pointer to an array of SC_ACTION structures.

    - ### Fields inherited from class com.sun.jna.Structure

      `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Winsvc.SERVICE_FAILURE_ACTIONS()`
    `Winsvc.SERVICE_FAILURE_ACTIONS(Pointer p)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.List` | `getFieldOrder()` Return this Structure's field names in their proper order.

    - ### Methods inherited from class com.sun.jna.Structure

      `allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setFieldOrder, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### dwResetPeriod

          public int dwResetPeriod

      The time after which to reset the failure count to zero if there are no failures, in seconds. Specify INFINITE to indicate that this value should never be reset.

    - #### lpRebootMsg

          public java.lang.String lpRebootMsg

      The message to be broadcast to server users before rebooting in response to the SC_ACTION_REBOOT service controller action. If this value is NULL, the reboot message is unchanged. If the value is an empty string (""), the reboot message is deleted and no message is broadcast. This member can specify a localized string using the following format: "@[path]dllname,-strID" The string with identifier strID is loaded from dllname; the path is optional. For more information, see RegLoadMUIString. Windows Server 2003 and Windows XP: Localized strings are not supported until Windows Vista.

    - #### lpCommand

          public java.lang.String lpCommand

      The command line of the process for the CreateProcess function to execute in response to the SC_ACTION_RUN_COMMAND service controller action. This process runs under the same account as the service. If this value is NULL, the command is unchanged. If the value is an empty string (""), the command is deleted and no program is run when the service fails.

    - #### cActions

          public int cActions

      The number of elements in the lpsaActions array. If this value is 0, but lpsaActions is not NULL, the reset period and array of failure actions are deleted.

    - #### lpsaActions

          public Winsvc.SC_ACTION.ByReference lpsaActions

      A pointer to an array of SC_ACTION structures. If this value is NULL, the cActions and dwResetPeriod members are ignored.

    - #### FIELDS

          public static final java.util.List<java.lang.String> FIELDS

  - ### Constructor Detail

    - #### Winsvc.SERVICE_FAILURE_ACTIONS

          public Winsvc.SERVICE_FAILURE_ACTIONS()

    - #### Winsvc.SERVICE_FAILURE_ACTIONS

          public Winsvc.SERVICE_FAILURE_ACTIONS(Pointer p)

  - ### Method Detail

    - #### getFieldOrder

          protected java.util.List getFieldOrder()

      Description copied from class: `Structure`
      Return this Structure's field names in their proper order. For example,

           protected List getFieldOrder() {
               return Arrays.asList(new String[] { ... });
           }

      IMPORTANT When deriving from an existing Structure subclass, ensure that you augment the list provided by the superclass, e.g.

           protected List getFieldOrder() {
               List fields = new ArrayList(super.getFieldOrder());
               fields.addAll(Arrays.asList(new String[] { ... }));
               return fields;
           }

      Field order must be explicitly indicated, since the field order as returned by `Class.getFields()` is not guaranteed to be predictable.
      Specified by:
        `getFieldOrder` in class `Structure`
      Returns:
        ordered list of field names

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.