|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ibm.aglets.AgletContextImpl
The AgletContextImpl class is the execution context for running aglets. It provides means for maintaining and managing running aglets in an environment where the aglets are protected from each other and the host system is secured against malicious aglets.
| Method Summary | |
void |
addContextListener(ContextListener o)
Adds the specified context listener to receive context events from this context. |
void |
clearCache(java.net.URL codebase)
Clear the cache |
AgletProxy |
createAglet(java.net.URL url,
java.lang.String classname,
java.lang.Object init)
Creates an instance of the specified aglet located at the specified URL. |
java.util.Enumeration |
getAgletProxies()
Gets the aglet proxies in the current execution context. |
java.util.Enumeration |
getAgletProxies(int type)
Gets the aglet proxies in the current execution context. |
AgletProxy |
getAgletProxy(AgletID aid)
Gets the proxy for an aglet specified by its identity. |
AgletProxy |
getAgletProxy(java.net.URL host,
AgletID aid)
Deprecated. |
java.applet.AudioClip |
getAudioClip(java.net.URL url)
Gets an audio clip. |
java.net.URL |
getHostingURL()
Returns the URL of the daemon serving all current execution contexts. |
java.awt.Image |
getImage(ImageData d)
Gets an image. |
java.awt.Image |
getImage(java.net.URL url)
Gets an image. |
ImageData |
getImageData(java.net.URL url)
Gets an image data. |
java.lang.String |
getName()
Gets the name of the context |
Persistence |
getPersistence()
|
java.lang.Object |
getProperty(java.lang.String key)
Gets the context property indicated by the key. |
java.lang.Object |
getProperty(java.lang.String key,
java.lang.Object def)
Gets the context property indicated by the key and default value. |
ResourceManagerFactory |
getResourceManagerFactory()
|
ReplySet |
multicastMessage(Message msg)
Sends a multicast message to the subscribers in the context. |
void |
postEvent(ContextEvent event,
boolean sync)
|
void |
postEvent0(ContextEvent event)
|
void |
receiveAglet(Name agent_name,
ClassName[] classnames,
java.lang.String codebase,
byte[] agent,
java.lang.String sender)
Receives an aglet. |
void |
removeContextListener(ContextListener o)
Removes the specified context listener. |
AgletProxy |
retractAglet(Ticket ticket,
AgletID aid)
|
AgletProxy |
retractAglet(java.net.URL url)
Deprecated. |
AgletProxy |
retractAglet(java.net.URL url,
AgletID aid)
Retracts the Aglet specified by its url: scheme://host-domain-name/[user-name]#aglet-identity. |
void |
setPersistence(Persistence p)
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
Sets the context property |
void |
setResourceManagerFactory(ResourceManagerFactory rmf)
|
void |
showDocument(java.net.URL url)
Shows a new document. |
void |
shutdown()
Shutdown the context. |
void |
shutdown(Message msg)
Shutdown the context with the specific message object. |
void |
start()
Starts |
void |
start(boolean reactivate)
Starts the context. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void addContextListener(ContextListener o)
AgletContextaddContextListener in interface AgletContextcom.ibm.aglet.AgletContextlistener - the context listenerjava.lang.SecurityException - public void clearCache(java.net.URL codebase)
clearCache in interface AgletContextcom.ibm.aglet.AgletContextcodebase - the codebase of the cache to clean up. if null,
entire cache in this context is cleared.
public AgletProxy createAglet(java.net.URL url,
java.lang.String classname,
java.lang.Object init)
throws java.io.IOException,
AgletException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException
createAglet in interface AgletContexturl - the URL to load the aglet class from.name - the aglet's class name.java.lang.ClassNotFoundException - if the class was not foundjava.lang.InstantiationException - if failed to instantiate the Aglet.public java.util.Enumeration getAgletProxies()
getAgletProxies in interface AgletContextpublic java.util.Enumeration getAgletProxies(int type)
getAgletProxies in interface AgletContextpublic AgletProxy getAgletProxy(AgletID aid)
getAgletProxy in interface AgletContextaid - the identity of the aglet.
public AgletProxy getAgletProxy(java.net.URL host,
AgletID aid)
getAgletProxy in interface AgletContextaid - the identity of the aglet.public java.applet.AudioClip getAudioClip(java.net.URL url)
AgletContextgetAudioClip in interface AgletContextcom.ibm.aglet.AgletContextaudio - an absolute URL giving the location of the audio file.public java.net.URL getHostingURL()
getHostingURL in interface AgletContextAgletException - if the hosting URL cannot be determined.public java.awt.Image getImage(ImageData d)
AgletContextgetImage in interface AgletContextcom.ibm.aglet.AgletContextimage - a serializable image data.public java.awt.Image getImage(java.net.URL url)
AgletContextgetImage in interface AgletContextcom.ibm.aglet.AgletContextimage - an absolute URL giving the location of the image file.public ImageData getImageData(java.net.URL url)
AgletContextgetImageData in interface AgletContextcom.ibm.aglet.AgletContextimage - an absolute URL giving the location of the image file.public java.lang.String getName()
getName in interface AgletContext
public Persistence getPersistence()
throws java.io.IOException
public java.lang.Object getProperty(java.lang.String key)
getProperty in interface AgletContextkey - the name of the context property.
public java.lang.Object getProperty(java.lang.String key,
java.lang.Object def)
getProperty in interface AgletContextkey - the name of the context property.def - the value to use if this property is not set.public ResourceManagerFactory getResourceManagerFactory()
public ReplySet multicastMessage(Message msg)
AgletContextmulticastMessage in interface AgletContextcom.ibm.aglet.AgletContextmessage - to send
public void postEvent(ContextEvent event,
boolean sync)
public void postEvent0(ContextEvent event)
public void receiveAglet(Name agent_name,
ClassName[] classnames,
java.lang.String codebase,
byte[] agent,
java.lang.String sender)
throws AgletException,
java.lang.ClassNotFoundException
aglet - the aglet to be received by the context.AgletException - if it is not received.public void removeContextListener(ContextListener o)
AgletContextremoveContextListener in interface AgletContextcom.ibm.aglet.AgletContextlistener - the context listenerjava.lang.SecurityException -
public AgletProxy retractAglet(Ticket ticket,
AgletID aid)
throws java.io.IOException,
AgletException
public AgletProxy retractAglet(java.net.URL url)
throws java.io.IOException,
AgletException
retractAglet in interface AgletContexturl - the location and aglet identity of the aglet to be retracted.AgletException - when the method failed to retract the aglet.
public AgletProxy retractAglet(java.net.URL url,
AgletID aid)
throws java.io.IOException,
AgletException
retractAglet in interface AgletContexturl - the location and aglet identity of the aglet to be retracted.aid - the aglet identity of the aglet to be retracted.AgletException - when the method failed to retract the aglet.
public void setPersistence(Persistence p)
throws AgletException
public void setProperty(java.lang.String key,
java.lang.Object value)
setProperty in interface AgletContextcom.ibm.aglet.AgletContextkey - the name of the context property.value - the value to be stored.public void setResourceManagerFactory(ResourceManagerFactory rmf)
public void showDocument(java.net.URL url)
showDocument in interface AgletContexturl - an url to be shownpublic void shutdown()
AgletContextshutdown in interface AgletContextcom.ibm.aglet.AgletContextjava.lang.SecurityException - if the current execution context is not
allowd to shutdownstartpublic void shutdown(Message msg)
AgletContextshutdown in interface AgletContextcom.ibm.aglet.AgletContextjava.lang.SecurityException - if the current execution context is not
allowd to shutdownstartpublic void start()
start in interface AgletContextcom.ibm.aglet.AgletContextjava.lang.SecurityException - public void start(boolean reactivate)
AgletContextstart in interface AgletContextcom.ibm.aglet.AgletContextreactivate - if false, it does not activate aglets in the deactivation spooljava.lang.SecurityException -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||