|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.aglet.system.AgletRuntime | +--com.ibm.aglets.AgletRuntime
Field Summary | |
static int |
AGLET_MAGIC
Magic number of Aglet |
static byte |
AGLET_STREAM_VERSION
Version of Aglet Trasfer Format |
Constructor Summary | |
AgletRuntime()
|
Method Summary | |
java.security.cert.Certificate |
authenticateOwner(java.lang.String username,
java.lang.String password)
Authenticate an user with password. |
static java.security.cert.Certificate |
authenticateUser(java.lang.String username,
java.lang.String password)
Authenticate an user with password. |
static void |
clearCache()
Clear cache |
AgletProxy |
createAglet(java.lang.String contextName,
java.net.URL codebase,
java.lang.String classname,
java.lang.Object init)
Creates an aglet remotely within the specified context. |
AgletContext |
createAgletContext(java.lang.String name)
AgletContext managements in this runtime |
static Persistence |
createPersistenceFor(AgletContext cxt)
|
AgletContext |
getAgletContext(java.lang.String name)
Returns the AgletContext which has the specified name. |
AgletContext[] |
getAgletContexts()
Gets the contexts in the environment. |
AgletProxy[] |
getAgletProxies(java.lang.String contextName)
Gets an enumeration of aglet proxies of all aglets residing in the context specified by contextAddress. |
AgletProxy |
getAgletProxy(java.lang.String contextName,
AgletID aid)
Obtains a proxy reference the remote aglet. |
java.lang.String |
getAgletsProperty(java.lang.String key)
Returns aglets property of the user who owns the runtime. |
java.lang.String |
getAgletsProperty(java.lang.String key,
java.lang.String def)
Returns aglets property of the user who owns the runtime. |
static java.security.cert.Certificate |
getCertificate(byte[] encoded)
Returns certificate of a user. |
static java.security.cert.Certificate |
getCertificate(java.lang.String username)
Returns certificate of a user. |
static java.lang.String |
getCertificateAlias(java.security.cert.Certificate cert)
|
static ResourceManagerFactory |
getDefaultResourceManagerFactory()
|
java.security.cert.Certificate |
getOwnerCertificate()
Returns certificate of the user who owns the runtime. |
java.lang.String |
getOwnerName()
Returns name of the user who owns the runtime. |
static java.security.PrivateKey |
getPrivateKey(java.security.cert.Certificate cert,
char[] passwd)
|
java.lang.String |
getProperty(java.lang.String prop,
java.lang.String key)
Returns property of the user who owns the runtime. |
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. |
static java.security.cert.Certificate |
getRegisteredCertificate(java.lang.String username)
Returns certificate of a registered user. |
java.lang.String |
getServerAddress()
Gets an address of the server |
protected void |
initialize(java.lang.String[] args)
Initializes an AgletRuntime object with the given array of string. |
static boolean |
isVerbose()
Verbose message |
void |
killAglet(AgletProxy proxy)
Kill the specified aglet. |
void |
removeAgletContext(AgletContext cxt)
Removes the specified aglet context from the runtime environment. |
void |
setAgletsProperty(java.lang.String key,
java.lang.String value)
Sets aglets property of the user who owns the runtime. |
static void |
setDefaultResourceManagerFactory(ResourceManagerFactory factory)
|
static void |
setPersistenceFactory(PersistenceFactory p_factory)
|
void |
setProperty(java.lang.String prop,
java.lang.String key,
java.lang.String value)
Sets property of the user who owns the runtime. |
void |
shutdown()
Shutdown |
void |
shutdown(Message msg)
Shutdown all contexts in the current runtime with the specific message object. |
static void |
verboseOut(java.lang.String msg)
|
Methods inherited from class com.ibm.aglet.system.AgletRuntime |
getAgletRuntime, init, init, isSecure, setSecure |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AGLET_MAGIC
public static final byte AGLET_STREAM_VERSION
Constructor Detail |
public AgletRuntime()
Method Detail |
public java.security.cert.Certificate authenticateOwner(java.lang.String username, java.lang.String password)
authenticateOwner
in class AgletRuntime
username
- username of the user who will own the runtimepassword
- password of the userpublic static java.security.cert.Certificate authenticateUser(java.lang.String username, java.lang.String password)
username
- username of the userpassword
- password of the userpublic static void clearCache()
public AgletProxy createAglet(java.lang.String contextName, java.net.URL codebase, java.lang.String classname, java.lang.Object init) throws java.io.IOException
AgletRuntime
createAglet
in class AgletRuntime
com.ibm.aglet.system.AgletRuntime
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 AgletContext createAgletContext(java.lang.String name)
createAgletContext
in class AgletRuntime
com.ibm.aglet.system.AgletRuntime
java.lang.SecurityException
- if the current execution is not allowed
to create an AgletContext.public static Persistence createPersistenceFor(AgletContext cxt)
public AgletContext getAgletContext(java.lang.String name)
AgletRuntime
getAgletContext
in class AgletRuntime
com.ibm.aglet.system.AgletRuntime
name
- the name of the contextjava.lang.SecurityException
- if the current execution is not allowed
to acccess the AgletContext.public AgletContext[] getAgletContexts()
AgletRuntime
getAgletContexts
in class AgletRuntime
public AgletProxy[] getAgletProxies(java.lang.String contextName) throws java.io.IOException
getAgletProxies
in class AgletRuntime
contextAddress
- public AgletProxy getAgletProxy(java.lang.String contextName, AgletID aid) throws java.io.IOException
getAgletProxy
in class AgletRuntime
com.ibm.aglet.system.AgletRuntime
contextAddress
- specify context URL with a string.id
- target aglet identifyer.public java.lang.String getAgletsProperty(java.lang.String key)
getAgletsProperty
in class AgletRuntime
key
- key of aglets propertyjava.lang.SecurityException
- if PropertyPermission for the key is not give.public java.lang.String getAgletsProperty(java.lang.String key, java.lang.String def)
getAgletsProperty
in class AgletRuntime
key
- key of aglets propertydef
- default value of aglets propertyjava.lang.SecurityException
- if PropertyPermission for the key is not given.public static java.security.cert.Certificate getCertificate(byte[] encoded)
encoded
- an encoded byte array of a certificate.public static java.security.cert.Certificate getCertificate(java.lang.String username)
username
- an certificate alias in the keystore.public static java.lang.String getCertificateAlias(java.security.cert.Certificate cert)
cert
- java.security.cert.Certificatepublic static ResourceManagerFactory getDefaultResourceManagerFactory()
public java.security.cert.Certificate getOwnerCertificate()
getOwnerCertificate
in class AgletRuntime
public java.lang.String getOwnerName()
getOwnerName
in class AgletRuntime
public static java.security.PrivateKey getPrivateKey(java.security.cert.Certificate cert, char[] passwd)
cert
- java.security.cert.Certificatepasswd
- byte[]public java.lang.String getProperty(java.lang.String prop, java.lang.String key)
getProperty
in class AgletRuntime
prop
- name of propertieskey
- key of propertyjava.lang.SecurityException
- if PropertyPermission for the key is not given.public java.lang.String getProperty(java.lang.String prop, java.lang.String key, java.lang.String def)
getProperty
in class AgletRuntime
prop
- name of propertieskey
- key of propertydef
- default value of propertyjava.lang.SecurityException
- if PropertyPermission for the key is not given.public static java.security.cert.Certificate getRegisteredCertificate(java.lang.String username)
username
- an certificate alias in the keystore.public java.lang.String getServerAddress()
AgletRuntime
getServerAddress
in class AgletRuntime
com.ibm.aglet.system.AgletRuntime
protected void initialize(java.lang.String[] args)
AgletRuntime
initialize
in class AgletRuntime
com.ibm.aglet.system.AgletRuntime
args
- arguments used to initializejava.lang.IllegalAccessException
- if the instance has
been already initialized.public static final boolean isVerbose()
public void killAglet(AgletProxy proxy) throws InvalidAgletException
killAglet
in class AgletRuntime
com.ibm.aglet.system.AgletRuntime
proxy
- the aglet proxy object to kill.public void removeAgletContext(AgletContext cxt)
AgletRuntime
removeAgletContext
in class AgletRuntime
com.ibm.aglet.system.AgletRuntime
cxt
- the context to removepublic void setAgletsProperty(java.lang.String key, java.lang.String value)
setAgletsProperty
in class AgletRuntime
key
- key of aglets propertyvalue
- value of specified aglets propertyjava.lang.SecurityException
- if permissions for the key are not given.public static void setDefaultResourceManagerFactory(ResourceManagerFactory factory)
public static void setPersistenceFactory(PersistenceFactory p_factory)
public void setProperty(java.lang.String prop, java.lang.String key, java.lang.String value)
setProperty
in class AgletRuntime
prop
- name of propertieskey
- key of propertyvalue
- value of specified propertyjava.lang.SecurityException
- if permissions for the key are not given.public void shutdown()
shutdown
in class AgletRuntime
public void shutdown(Message msg)
AgletRuntime
shutdown
in class AgletRuntime
public static final void verboseOut(java.lang.String msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |