|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.aglet.system.AgletRuntime
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.
getAgletRuntime()
Constructor Summary | |
AgletRuntime()
|
Method Summary | |
abstract java.security.cert.Certificate |
authenticateOwner(java.lang.String username,
java.lang.String password)
Authenticate an user with password. |
protected abstract AgletProxy |
createAglet(java.lang.String contextAddress,
java.net.URL codebase,
java.lang.String name,
java.lang.Object init)
Creates an aglet remotely within the specified context. |
abstract AgletContext |
createAgletContext(java.lang.String name)
Creates an DefaultAgletContext object given by the Framework implementation with specified name. |
abstract AgletContext |
getAgletContext(java.lang.String name)
Returns the AgletContext which has the specified name. |
abstract AgletContext[] |
getAgletContexts()
Gets the contexts in the environment. |
protected abstract AgletProxy[] |
getAgletProxies(java.lang.String contextAddress)
Returns the proxies in the context specified by the contextAddress. |
protected abstract AgletProxy |
getAgletProxy(java.lang.String contextAddress,
AgletID id)
Obtains the remote proxy for the aglet specified by the context and id. |
static AgletRuntime |
getAgletRuntime()
Gets the AgletRuntime object associated with the current Java application. |
abstract java.lang.String |
getAgletsProperty(java.lang.String key)
Returns aglets property of the user who owns the runtime. |
abstract java.lang.String |
getAgletsProperty(java.lang.String key,
java.lang.String def)
Returns aglets property of the user who owns the runtime. |
abstract java.security.cert.Certificate |
getOwnerCertificate()
Returns certificate of the user who owns the runtime. |
abstract java.lang.String |
getOwnerName()
Returns name of the user who owns the runtime. |
abstract java.lang.String |
getProperty(java.lang.String prop,
java.lang.String key)
Returns property of the user who owns the runtime. |
abstract java.lang.String |
getProperty(java.lang.String prop,
java.lang.String key,
java.lang.String def)
Returns property of the user who owns the runtime. |
abstract java.lang.String |
getServerAddress()
Gets an address of the server |
static AgletRuntime |
init(java.lang.String[] args)
Create and initialize a runtime environment with a string array |
static AgletRuntime |
init(java.lang.String[] args,
java.lang.ClassLoader loader)
Create and initialize a runtime environment with a string array |
protected abstract void |
initialize(java.lang.String[] args)
Initializes an AgletRuntime object with the given array of string. |
boolean |
isSecure()
Returns security. |
abstract void |
killAglet(AgletProxy proxy)
Kill the specified aglet. |
abstract void |
removeAgletContext(AgletContext cxt)
Removes the specified aglet context from the runtime environment. |
abstract void |
setAgletsProperty(java.lang.String key,
java.lang.String value)
Sets aglets property of the user who owns the runtime. |
abstract void |
setProperty(java.lang.String prop,
java.lang.String key,
java.lang.String value)
Save property of the user who owns the runtime. |
protected void |
setSecure(boolean secure)
Sets secure. |
abstract void |
shutdown()
Shutdown all contexts in the runtime |
abstract void |
shutdown(Message msg)
Shutdown all contexts in the current runtime with the specific message object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AgletRuntime()
Method Detail |
public abstract java.security.cert.Certificate authenticateOwner(java.lang.String username, java.lang.String password)
username
- username of the user who will own the runtimepassword
- password of the userprotected abstract AgletProxy createAglet(java.lang.String contextAddress, java.net.URL codebase, java.lang.String name, java.lang.Object init) throws java.io.IOException
contextAddress
- an address of context.codebase
- an codebase for the aglet.name
- name of aglets' class.init
- an object passed as an initialize argument.Aglet.onCreation(java.lang.Object)
,
AgletContext.createAglet(java.net.URL, java.lang.String, java.lang.Object)
public abstract AgletContext createAgletContext(java.lang.String name)
java.lang.SecurityException
- if the current execution is not allowed
to create an AgletContext.public abstract AgletContext getAgletContext(java.lang.String name)
name
- the name of the contextjava.lang.SecurityException
- if the current execution is not allowed
to acccess the AgletContext.public abstract AgletContext[] getAgletContexts()
protected abstract AgletProxy[] getAgletProxies(java.lang.String contextAddress) throws java.io.IOException
contextAddress
- specify context URL with a string.protected abstract AgletProxy getAgletProxy(java.lang.String contextAddress, AgletID id) throws java.io.IOException
contextAddress
- specify context URL with a string.id
- target aglet identifyer.public static AgletRuntime getAgletRuntime()
public abstract java.lang.String getAgletsProperty(java.lang.String key)
key
- key of aglets propertyjava.lang.SecurityException
- if PropertyPermission for the key is not give.public abstract java.lang.String getAgletsProperty(java.lang.String key, java.lang.String def)
key
- key of aglets propertydef
- default value of aglets propertyjava.lang.SecurityException
- if PropertyPermission for the key is not given.public abstract java.security.cert.Certificate getOwnerCertificate()
public abstract java.lang.String getOwnerName()
public abstract java.lang.String getProperty(java.lang.String prop, java.lang.String key)
prop
- name of propertieskey
- key of propertyjava.lang.SecurityException
- if PropertyPermission for the key is not given.public abstract java.lang.String getProperty(java.lang.String prop, java.lang.String key, java.lang.String def)
prop
- name of propertieskey
- key of propertydef
- default value of propertyjava.lang.SecurityException
- if PropertyPermission for the key is not given.public abstract java.lang.String getServerAddress()
public static AgletRuntime init(java.lang.String[] args)
a
- string array which is typically given as a argument to
main(String args[]) function.public static AgletRuntime init(java.lang.String[] args, java.lang.ClassLoader loader)
a
- string array which is typically given as a argument to
main(String args[]) function.loader
- a classloader used to load a class of the
implementation.protected abstract void initialize(java.lang.String[] args)
args
- arguments used to initializejava.lang.IllegalAccessException
- if the instance has
been already initialized.public boolean isSecure()
public abstract void killAglet(AgletProxy proxy) throws InvalidAgletException
proxy
- the aglet proxy object to kill.public abstract void removeAgletContext(AgletContext cxt)
cxt
- the context to removepublic abstract void setAgletsProperty(java.lang.String key, java.lang.String value)
key
- key of aglets propertyvalue
- value of specified aglets propertyjava.lang.SecurityException
- if permissions for the key are not given.public abstract void setProperty(java.lang.String prop, java.lang.String key, java.lang.String value)
prop
- name of propertieskey
- key of propertyvalue
- value of specified propertyjava.lang.SecurityException
- if permissions for the key are not given.protected void setSecure(boolean secure)
secure
- true if the runtime is working with securitypublic abstract void shutdown()
public abstract void shutdown(Message msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |