Class aglet.system.AgletRuntime
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aglet.system.AgletRuntime

java.lang.Object
   |
   +----aglet.system.AgletRuntime

public class AgletRuntime
extends Object
AgletRuntime class provides the way to access the information of the local or remote context. Neither of an application nor aglet can create its own instance of this runtime class.
See Also:
getAgletRuntime

Constructor Index

 o AgletRuntime()

Method Index

 o createAglet(String, URL, String, Object)
Creates an aglet remotely within the specified context.
 o createAgletContext(String)
Creates an DefaultAgletContext object given by the Framework implementation with specified name.
 o getAgletContext(String)
Returns the AgletContext which has the specified name.
 o getAgletContexts()
Gets the contexts in the environment.
 o getAgletProxies(String)
Returns the proxies in the context specified by the contextAddress.
 o getAgletProxy(String, AgletID)
Obtains the remote proxy for the aglet specified by the context and id.
 o getAgletRuntime()
Gets the AgletRuntime object associated with the current Java application.
 o getServerURL()
Gets an address of the server in URL.
 o removeAgletContext(AgletContext)
Removes the specified aglet context from the runtime environment.
 o shutdown()
Shutdown all contexts in the runtime
 o shutdown(Message)
Shutdown all contexts in the current runtime with the specific message object.

Constructors

 o AgletRuntime
  public AgletRuntime()

Methods

 o getAgletRuntime
  public static synchronized AgletRuntime getAgletRuntime()
Gets the AgletRuntime object associated with the current Java application.
 o createAgletContext
  public abstract AgletContext createAgletContext(String name)
Creates an DefaultAgletContext object given by the Framework implementation with specified name. Hosting multiple contexts is not supported in alpha5 release.
Throws: SecurityException
if the current execution is not allowed to create an AgletContext.
 o getAgletContext
  public abstract AgletContext getAgletContext(String name)
Returns the AgletContext which has the specified name.
Parameters:
name - the name of the context
Throws: SecurityException
if the current execution is not allowed to acccess the AgletContext.
 o removeAgletContext
  public abstract void removeAgletContext(AgletContext cxt)
Removes the specified aglet context from the runtime environment. It is also removed from export list if it's exported.
Parameters:
cxt - the context to remove
 o getAgletContexts
  public abstract AgletContext[] getAgletContexts()
Gets the contexts in the environment.
 o createAglet
  public abstract AgletProxy createAglet(String contextAddress,
                                         URL codebase,
                                         String name,
                                         Object init)
Creates an aglet remotely within the specified context.
Parameters:
contextAddress - an address of context.
codebase - an codebase for the aglet.
name - name of aglets' class.
init - an object passed as an initialize argument.
See Also:
onCreation, createAglet
 o getAgletProxy
  public abstract AgletProxy getAgletProxy(String contextAddress,
                                           AgletID id)
Obtains the remote proxy for the aglet specified by the context and id.
 o getAgletProxies
  public abstract AgletProxy[] getAgletProxies(String contextAddress)
Returns the proxies in the context specified by the contextAddress.
 o getServerURL
  public abstract URL getServerURL()
Gets an address of the server in URL.
Returns:
an URL represents the address of the server
 o shutdown
  public abstract void shutdown()
Shutdown all contexts in the runtime
 o shutdown
  public abstract void shutdown(Message msg)
Shutdown all contexts in the current runtime with the specific message object. This messag object is delivered to all aglets in all contexts before all aglets are killed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index