|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.aglet.system.AgletRuntime
com.ibm.aglets.AgletRuntime
| Field Summary | |
private static java.security.KeyStore |
_keyStore
|
private java.lang.String |
_ownerAlias
|
private java.security.cert.Certificate |
_ownerCertificate
|
private static java.util.Random |
_randomGenerator
|
static int |
AGLET_MAGIC
Magic number of Aglet |
static byte |
AGLET_STREAM_VERSION
Version of Aglet Trasfer Format |
private static java.security.cert.Certificate |
ANONYMOUS_USER
|
private static java.util.ResourceBundle |
bundle
|
private static java.lang.Object[][] |
contents
|
(package private) static java.util.Hashtable |
contexts
|
(package private) static AgletRuntime |
currentRuntime
|
private static java.lang.String |
DEFAULT_VIEWER
|
private static ResourceManagerFactory |
defaultResourceManagerFactory
Gets User Authenticator. |
private static boolean |
initialized
|
private static LogCategory |
log
|
(package private) static Opt[] |
option_defs
|
private static PersistenceFactory |
persistenceFactory
|
private static boolean |
verbose
|
private static Version |
VERSION
|
| Fields inherited from class com.ibm.aglet.system.AgletRuntime |
|
| 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. |
(package private) static void |
check()
|
(package private) void |
checkPermission(java.security.Permission p)
|
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. |
(package private) static java.security.cert.Certificate |
getAnonymousUserCertificate()
|
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)
|
(package private) static java.security.cert.Certificate |
getCurrentCertificate()
This was getCurrentIdentity |
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. |
(package private) static Name |
newName(java.security.cert.Certificate authority)
|
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. |
private void |
startup()
|
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
private static Version VERSION
private static java.util.ResourceBundle bundle
private static final LogCategory log
private static java.lang.Object[][] contents
private static final java.lang.String DEFAULT_VIEWER
static final Opt[] option_defs
static AgletRuntime currentRuntime
static java.util.Hashtable contexts
private static java.security.cert.Certificate ANONYMOUS_USER
private static boolean verbose
private static boolean initialized
private static ResourceManagerFactory defaultResourceManagerFactory
private static PersistenceFactory persistenceFactory
private static java.util.Random _randomGenerator
private java.lang.String _ownerAlias
private java.security.cert.Certificate _ownerCertificate
private static java.security.KeyStore _keyStore
| 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 user
static void check()
void checkPermission(java.security.Permission p)
public 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 AgletRuntimecontextName - an address of context.codebase - an codebase for the aglet.classname - name of aglets' class.init - an object passed as an initialize argument.
java.io.IOExceptionAglet.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 AgletRuntimepublic static Persistence createPersistenceFor(AgletContext cxt)
public AgletContext getAgletContext(java.lang.String name)
AgletRuntime
getAgletContext in class AgletRuntimename - the name of the contextpublic AgletContext[] getAgletContexts()
AgletRuntime
getAgletContexts in class AgletRuntime
public AgletProxy[] getAgletProxies(java.lang.String contextName)
throws java.io.IOException
getAgletProxies in class AgletRuntimecontextName - specify context URL with a string.
java.io.IOException
public AgletProxy getAgletProxy(java.lang.String contextName,
AgletID aid)
throws java.io.IOException
getAgletProxy in class AgletRuntimecontextName - specify context URL with a string.aid - target aglet identifyer.
java.io.IOExceptionpublic java.lang.String getAgletsProperty(java.lang.String key)
getAgletsProperty in class AgletRuntimekey - key of aglets property
java.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 property
java.lang.SecurityException - if PropertyPermission for the key is not given.static java.security.cert.Certificate getAnonymousUserCertificate()
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.Certificate
static java.security.cert.Certificate getCurrentCertificate()
public 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 property
java.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 property
java.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 AgletRuntimeprotected void initialize(java.lang.String[] args)
AgletRuntime
initialize in class AgletRuntimeargs - arguments used to initializepublic static final boolean isVerbose()
public void killAglet(AgletProxy proxy)
throws InvalidAgletException
killAglet in class AgletRuntimeproxy - the aglet proxy object to kill.
InvalidAgletExceptionstatic Name newName(java.security.cert.Certificate authority)
public void removeAgletContext(AgletContext cxt)
AgletRuntime
removeAgletContext in class 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 property
java.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 property
java.lang.SecurityException - if permissions for the key are not given.public void shutdown()
shutdown in class AgletRuntimepublic void shutdown(Message msg)
AgletRuntime
shutdown in class AgletRuntimeprivate void startup()
public static final void verboseOut(java.lang.String msg)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||