com.notuvy.singleapp
Class DummyApp.Preemt
java.lang.Object
com.notuvy.singleapp.DummyApp
com.notuvy.singleapp.DummyApp.Preemt
- All Implemented Interfaces:
- Preemptable, Runnable
- Enclosing class:
- DummyApp
public static class DummyApp.Preemt
- extends DummyApp
- implements Preemptable
Method Summary |
void |
gracefulExitForPreempt()
The final hook allowing the preempted application to shutdown
gracefully. |
void |
recvFromPreempted(Object pObject)
Callback to handle the situation where an earlier instance is running,
and a this instance started and told it to die. |
Serializable |
sendToPreemptor()
Callback to handle the situation where this instance is running, and
a second instance started and told this one to die. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
DummyApp.Preemt
public DummyApp.Preemt()
gracefulExitForPreempt
public void gracefulExitForPreempt()
- Description copied from interface:
Preemptable
- The final hook allowing the preempted application to shutdown
gracefully.
- Specified by:
gracefulExitForPreempt
in interface Preemptable
sendToPreemptor
public Serializable sendToPreemptor()
- Description copied from interface:
Preemptable
- Callback to handle the situation where this instance is running, and
a second instance started and told this one to die.
This method can contain any logic needed to handle handoff data
between the two.
- Specified by:
sendToPreemptor
in interface Preemptable
- Returns:
- A serializable object that communicates the handoff from the dying application to the surviving one.
recvFromPreempted
public void recvFromPreempted(Object pObject)
- Description copied from interface:
Preemptable
- Callback to handle the situation where an earlier instance is running,
and a this instance started and told it to die.
This method can contain any logic needed to handle handoff data
between the two.
- Specified by:
recvFromPreempted
in interface Preemptable
- Parameters:
pObject
- A serializable object that communicates the handoff from the dying application to the surviving one.
Copyright © 2012. All Rights Reserved.