com.notuvy.singleapp
Interface Preemptable

All Superinterfaces:
Runnable
All Known Implementing Classes:
DummyApp.Preemt

public interface Preemptable
extends Runnable

An application that want to automatically be managed as a single invocation must implement this to be able to use SingleAppEnforcer.

Author:
murali

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 interface java.lang.Runnable
run
 

Method Detail

sendToPreemptor

Serializable sendToPreemptor()
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.

Returns:
A serializable object that communicates the handoff from the dying application to the surviving one.

recvFromPreempted

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. This method can contain any logic needed to handle handoff data between the two.

Parameters:
pObject - A serializable object that communicates the handoff from the dying application to the surviving one.

gracefulExitForPreempt

void gracefulExitForPreempt()
The final hook allowing the preempted application to shutdown gracefully.



Copyright © 2012. All Rights Reserved.