|
||||||||||
| 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 AgletRuntimeusername - username of the user who will own the runtimepassword - password of the user
public 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
AgletRuntimecreateAglet in class AgletRuntimecom.ibm.aglet.system.AgletRuntimecontextAddress - 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 AgletRuntimecom.ibm.aglet.system.AgletRuntimejava.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)
AgletRuntimegetAgletContext in class AgletRuntimecom.ibm.aglet.system.AgletRuntimename - the name of the contextjava.lang.SecurityException - if the current execution is not allowed
to acccess the AgletContext.public AgletContext[] getAgletContexts()
AgletRuntimegetAgletContexts in class AgletRuntime
public AgletProxy[] getAgletProxies(java.lang.String contextName)
throws java.io.IOException
getAgletProxies in class AgletRuntimecontextAddress -
public AgletProxy getAgletProxy(java.lang.String contextName,
AgletID aid)
throws java.io.IOException
getAgletProxy in class AgletRuntimecom.ibm.aglet.system.AgletRuntimecontextAddress - specify context URL with a string.id - target aglet identifyer.public java.lang.String getAgletsProperty(java.lang.String key)
getAgletsProperty in class AgletRuntimekey - 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 AgletRuntimekey - 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 AgletRuntimepublic 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 AgletRuntimeprop - 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 AgletRuntimeprop - 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()
AgletRuntimegetServerAddress in class AgletRuntimecom.ibm.aglet.system.AgletRuntimeprotected void initialize(java.lang.String[] args)
AgletRuntimeinitialize in class AgletRuntimecom.ibm.aglet.system.AgletRuntimeargs - 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 AgletRuntimecom.ibm.aglet.system.AgletRuntimeproxy - the aglet proxy object to kill.public void removeAgletContext(AgletContext cxt)
AgletRuntimeremoveAgletContext in class AgletRuntimecom.ibm.aglet.system.AgletRuntimecxt - the context to remove
public void setAgletsProperty(java.lang.String key,
java.lang.String value)
setAgletsProperty in class AgletRuntimekey - 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 AgletRuntimeprop - 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 AgletRuntimepublic void shutdown(Message msg)
AgletRuntimeshutdown in class AgletRuntimepublic static final void verboseOut(java.lang.String msg)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||