|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.tanukisoftware.wrapper.event.WrapperEvent
org.tanukisoftware.wrapper.event.WrapperControlEvent
public class WrapperControlEvent
WrapperControlEvent are used to notify the listener whenever the native wrapper code traps a system control signal against the Java process. It is up to the listener to take any actions necessary.
The Wrapper will send this event to any registered listeners first, then it will pass the control code to the WrapperListener.controlEvent method. If the consume method is called, it will still be passed to other WrapperEventListeners, but will not be passed to the WrapperListener.controlEvent method. Other WrapperEventListeners should check the isConsumed method to decide whether or not the even has already been handled.
If the wrapper.ignore_signals property is set to true then the event will still be fired, but its isConsumed() method will return true initially.
Possible values are:
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
WrapperControlEvent(int controlEvent,
String controlEventName)
Creates a new WrapperControlEvent. |
Method Summary | |
---|---|
void |
consume()
Mark the event as consumed. |
int |
getControlEvent()
Returns the system control event. |
String |
getControlEventName()
Returns the name of the control event. |
long |
getFlags()
Returns a set of event flags for which the event should be fired. |
boolean |
isConsumed()
Returns true if the event has been consumed. |
String |
toString()
Returns a string representation of the event. |
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 Detail |
---|
public WrapperControlEvent(int controlEvent, String controlEventName)
controlEvent
- Service control event.controlEventName
- The name of the event.Method Detail |
---|
public long getFlags()
If a subclassed, the return value of the super class should usually be ORed with any additional flags.
getFlags
in class WrapperEvent
public int getControlEvent()
Possible values are: WrapperManager.WRAPPER_CTRL_C_EVENT, WRAPPER_CTRL_CLOSE_EVENT, WRAPPER_CTRL_LOGOFF_EVENT, WRAPPER_CTRL_SHUTDOWN_EVENT, WRAPPER_CTRL_TERM_EVENT, or WRAPPER_CTRL_HUP_EVENT.
public String getControlEventName()
public void consume()
On Windows, some events are sent both to the JVM and Wrapper processes. Event if the CTRL-C event is ignored within the JVM, the Wrapper process may still initiate a shutdown.
public boolean isConsumed()
public String toString()
toString
in class EventObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |