SunSPOT API V5.0


com.sun.spot.peripheral.ota
Class IsolateManager

java.lang.Object
  extended by com.sun.spot.peripheral.ota.IsolateManager

public class IsolateManager
extends Object

Provides a way to start/pause/stop Isolates.

Author:
vgupta

Constructor Summary
IsolateManager()
          Creates a new instance of IsolateManager
 
Method Summary
static String createUniversallyUniqueID(Isolate iso)
           
static String createUniversallyUniqueID(Isolate iso, String className)
           
static Properties getAllAppsStatus()
           
static String getAppStatus(String isolateId)
           
static int getAvailablePortHackVersion(String addr)
           
static Isolate getIsolate(String isoId)
          Looks up the isolate corresponding to the specified globally unique isolate Id.
static String getIsolateStatus(Isolate iso)
           
static String midletKeyToClass(String suiteId, String midletKey)
          Returns the class name corresponding to the specified MIDlet key, e.g.
static String migrateApp(String isolateId, String destination, boolean mkCopy)
          Moves the state associated with the specified isolate to remote address.
static String pauseApp(String isolateId)
           
static String receiveApp(String isoId, String source)
           
static String resumeApp(String isolateId)
           
static String startApp(String suiteId, int midletId)
          Creates an isolate for the specified MIDlet and suite.
static String startRemotePrinting(String isolateId, String addr)
           
static String stopApp(String isolateId)
           
static String stopRemotePrinting(String isolateId, String address, String port)
           
static Object[] vectorToArray(Vector v)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsolateManager

public IsolateManager()
Creates a new instance of IsolateManager

Method Detail

getIsolateStatus

public static String getIsolateStatus(Isolate iso)

createUniversallyUniqueID

public static String createUniversallyUniqueID(Isolate iso)

createUniversallyUniqueID

public static String createUniversallyUniqueID(Isolate iso,
                                               String className)

getIsolate

public static Isolate getIsolate(String isoId)
Looks up the isolate corresponding to the specified globally unique isolate Id.

Parameters:
isoId - globally unique isolate Id
Returns:
corresponding isolate or null (if the Id was unrecognized)

midletKeyToClass

public static String midletKeyToClass(String suiteId,
                                      String midletKey)
Returns the class name corresponding to the specified MIDlet key, e.g.

Parameters:
suiteId - Id of the suite in which to look for the given midlet number
midletKey - MIDlet key in the manifest, e.g. "MIDlet-1"
Returns:
class name for that MIDlet or a failure message

startApp

public static String startApp(String suiteId,
                              int midletId)
Creates an isolate for the specified MIDlet and suite.

Parameters:
suiteId - Id of an already installed suite.
midletId - MIDlet number to run
Returns:
Returns a globally unique isolateId if successful or null in case of a failure.

pauseApp

public static String pauseApp(String isolateId)

resumeApp

public static String resumeApp(String isolateId)

stopApp

public static String stopApp(String isolateId)

getAppStatus

public static String getAppStatus(String isolateId)

getAllAppsStatus

public static Properties getAllAppsStatus()

startRemotePrinting

public static String startRemotePrinting(String isolateId,
                                         String addr)

getAvailablePortHackVersion

public static int getAvailablePortHackVersion(String addr)

stopRemotePrinting

public static String stopRemotePrinting(String isolateId,
                                        String address,
                                        String port)

vectorToArray

public static Object[] vectorToArray(Vector v)

migrateApp

public static String migrateApp(String isolateId,
                                String destination,
                                boolean mkCopy)
Moves the state associated with the specified isolate to remote address. If the mkCopy flag is true, the specified isolate stays alive after this method call. Otherwise, it is stopped.


receiveApp

public static String receiveApp(String isoId,
                                String source)

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.