com.notuvy.singleapp
Interface Deferable

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

public interface Deferable
extends Runnable

A singleton application that will not start if another instance is active. Any application that wants this behavior must implement these methods. If no inter-application messaging is needed then "send" should return null and "recv" should do nothing.

Author:
murali

Method Summary
 void recvFromDeferred(Object pObject)
          Callback to handle the situation where this instance is running, and a second instance attempted to start but deferred to this.
 Serializable sendFromDeferred()
          Callback to handle the situation where another instance was running earlier, and this instance attempted to start but deferred to that.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

sendFromDeferred

Serializable sendFromDeferred()
Callback to handle the situation where another instance was running earlier, and this instance attempted to start but deferred to that. 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.

recvFromDeferred

void recvFromDeferred(Object pObject)
Callback to handle the situation where this instance is running, and a second instance attempted to start but deferred to this. 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.


Copyright © 2012. All Rights Reserved.