Package org.tanukisoftware.wrapper.event

# Class WrapperServiceActionEvent

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

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `WrapperServicePauseEvent`, `WrapperServiceResumeEvent`

public abstract class WrapperServiceActionEvent extends WrapperServiceEvent
WrapperServicePauseResumeEvents are used to notify the listener that the Wrapper is requesting that the Java application be paused or resumed. This does not mean that it should exit, only that it should internally go into an idle state. See the wrapper.pausable and wrapper.pausable.stop_jvm properties for more information.

Since:
  Wrapper 3.5.0
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`SOURCE_CODE_COMMAND_BLOCK_TIMEOUT`
Action result of an event command's block timeout expired.
`static final int`
`SOURCE_CODE_COMMANDFILE`
Action result of a command from a command file.
`static final int`
`SOURCE_CODE_DEADLOCK`
Action result of a deadlock being detected.
`static final int`
`SOURCE_CODE_FILTER`
Action result of a configured filter being fired.
`static final int`
`SOURCE_CODE_ON_EXIT`
Action result of a matched exit code.
`static final int`
`SOURCE_CODE_SIGNAL`
Action result of a signal.
`static final int`
`SOURCE_CODE_TIMER`
Action result of a configured timer being fired.
`static final int`
`SOURCE_CODE_WINDOWS_SERVICE_MANAGER`
Action resulted from the Windows Service Manager.

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

`source`

## Constructor Summary

Constructors
Constructor
Description
`WrapperServiceActionEvent(int actionSourceCode)`
Creates a new WrapperServiceActionEvent.

## Method Summary

Modifier and Type
Method
Description
`int`
`getSourceCode()`
Returns the Source Code describing where the event originated.
`String`
`getSourceCodeName()`
Returns the Source Code name.
`static String`
`getSourceCodeName(int actionSourceCode)`
Returns the name of the specified Source 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`

## Field Details

### SOURCE_CODE_FILTER

public static final int SOURCE_CODE_FILTER
Action result of a configured filter being fired. See the wrapper.filter.action.<n> property.

See Also:
  - Constant Field Values

### SOURCE_CODE_COMMANDFILE

public static final int SOURCE_CODE_COMMANDFILE
Action result of a command from a command file. See the wrapper.commandfile property.

See Also:
  - Constant Field Values

### SOURCE_CODE_WINDOWS_SERVICE_MANAGER

public static final int SOURCE_CODE_WINDOWS_SERVICE_MANAGER
Action resulted from the Windows Service Manager. This can happen from a number of sources including the command line, Service Control Panel, etc.

See Also:
  - Constant Field Values

### SOURCE_CODE_ON_EXIT

public static final int SOURCE_CODE_ON_EXIT
Action result of a matched exit code. See the wrapper.on_exit.<n> property.

See Also:
  - Constant Field Values

### SOURCE_CODE_SIGNAL

public static final int SOURCE_CODE_SIGNAL
Action result of a signal. See the wrapper.on_exit.<n> property.

See Also:
  - Constant Field Values

### SOURCE_CODE_DEADLOCK

public static final int SOURCE_CODE_DEADLOCK
Action result of a deadlock being detected. See the wrapper.check.deadlock.action property.

See Also:
  - Constant Field Values

### SOURCE_CODE_TIMER

public static final int SOURCE_CODE_TIMER
Action result of a configured timer being fired. See the wrapper.timer.<n>.action property.

See Also:
  - Constant Field Values

### SOURCE_CODE_COMMAND_BLOCK_TIMEOUT

public static final int SOURCE_CODE_COMMAND_BLOCK_TIMEOUT
Action result of an event command's block timeout expired. See the wrapper.event.<event_name>.command.block.action property.

See Also:
  - Constant Field Values

## Constructor Details

### WrapperServiceActionEvent

public WrapperServiceActionEvent(int actionSourceCode)
Creates a new WrapperServiceActionEvent.

Parameters:
  `actionSourceCode` - Source Code specifying where the action originated.

## Method Details

### getSourceCodeName

public static String getSourceCodeName(int actionSourceCode)
Returns the name of the specified Source Code.

Parameters:
  `actionSourceCode` - The Source Code whose name is being requested.
Returns:
  The name of the Source Code.

### getSourceCode

public int getSourceCode()
Returns the Source Code describing where the event originated.

Returns:
  The Source Code.

### getSourceCodeName

public String getSourceCodeName()
Returns the Source Code name.

Returns:
  The Source Code name.

### toString

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

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