Package org.tanukisoftware.wrapper.event

# Class WrapperServiceControlEvent

java.lang.Object
java.util.EventObject
org.tanukisoftware.wrapper.event.WrapperEvent
org.tanukisoftware.wrapper.event.WrapperServiceEvent
org.tanukisoftware.wrapper.event.WrapperServiceControlEvent

All Implemented Interfaces:
  `Serializable`

public class WrapperServiceControlEvent extends WrapperServiceEvent
WrapperServiceControlEvents are used to notify the listener whenever a Service Control Event is received by the service. These events will only be fired on Windows platforms when the Wrapper is running as a service.

WrapperManager.SERVICE_CONTROL_CODE_STOP (1)
  The service was requested to stop.
WrapperManager.SERVICE_CONTROL_CODE_PAUSE (2)
  The system requested that the service be paused.
WrapperManager.SERVICE_CONTROL_CODE_CONTINUE (3)
  The system requested that the paused service be resumed.
WrapperManager.SERVICE_CONTROL_CODE_INTERROGATE (4)
  The service manager queried the service to make sure it is still alive.
WrapperManager.SERVICE_CONTROL_CODE_SHUTDOWN (5)
  The system is shutting down.
User code (128-255)
  User defined code.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_QUERYSUSPEND (3328)
  The system being suspended.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_QUERYSUSPENDFAILED (3330)
  Permission to suspend the computer was denied by a process.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_SUSPEND (3332)
  The computer is about to enter a suspended state.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_RESUMECRITICAL (3334)
  The system has resumed operation. This event can indicate that some or all applications did not receive a SERVICE_CONTROL_CODE_POWEREVENT_SUSPEND event.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_RESUMESUSPEND (3335)
  The system has resumed operation after being suspended.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_BATTERYLOW (3337)
  The battery power is low.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_POWERSTATUSCHANGE (3338)
  There is a change in the power status of the computer, such as a switch from battery power to A/C.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_OEMEVENT (3339)
  The APM BIOS has signaled an APM OEM event.
WrapperManager.SERVICE_CONTROL_CODE_POWEREVENT_RESUMEAUTOMATIC (3346)
  The computer has woken up automatically to handle an event.

See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class java.util.EventObject

`source`

## Constructor Summary

Constructors
Constructor
Description
`WrapperServiceControlEvent(int serviceControlCode)`
Creates a new WrapperServiceControlEvent.

## Method Summary

Modifier and Type
Method
Description
`int`
`getServiceControlCode()`
Returns the event code of the Service Control Code.
`String`
`toString()`
Returns a string representation of the event.

### Methods inherited from class org.tanukisoftware.wrapper.event.WrapperServiceEvent

`getFlags`

### Methods inherited from class java.util.EventObject

`getSource`

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

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

## Constructor Details

### WrapperServiceControlEvent

public WrapperServiceControlEvent(int serviceControlCode)
Creates a new WrapperServiceControlEvent.

Parameters:
  `serviceControlCode` - Service Control Code.

## Method Details

### getServiceControlCode

public int getServiceControlCode()
Returns the event code of the Service Control Code.

Returns:
  The event code of the Service Control Code.

### toString

public String toString()
Returns a string representation of the event.

Overrides:
  `toString` in class `EventObject`
Returns:
  A string representation of the event.