com.notuvy.singleapp
Class DummyApp.Defer

java.lang.Object
  extended by com.notuvy.singleapp.DummyApp
      extended by com.notuvy.singleapp.DummyApp.Defer
All Implemented Interfaces:
Deferable, Runnable
Enclosing class:
DummyApp

public static class DummyApp.Defer
extends DummyApp
implements Deferable


Nested Class Summary
 
Nested classes/interfaces inherited from class com.notuvy.singleapp.DummyApp
DummyApp.Defer, DummyApp.Preemt
 
Field Summary
 
Fields inherited from class com.notuvy.singleapp.DummyApp
alive, LOG
 
Constructor Summary
DummyApp.Defer()
           
 
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 class com.notuvy.singleapp.DummyApp
main, run
 
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
 

Constructor Detail

DummyApp.Defer

public DummyApp.Defer()
Method Detail

sendFromDeferred

public Serializable sendFromDeferred()
Description copied from interface: Deferable
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.

Specified by:
sendFromDeferred in interface Deferable
Returns:
A serializable object that communicates the handoff from the dying application to the surviving one.

recvFromDeferred

public void recvFromDeferred(Object pObject)
Description copied from interface: Deferable
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.

Specified by:
recvFromDeferred in interface Deferable
Parameters:
pObject - A serializable object that communicates the handoff from the dying application to the surviving one.


Copyright © 2012. All Rights Reserved.