Interface aglet.AgletProxy
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface aglet.AgletProxy

public interface AgletProxy
extends Object
AgletProxy interface is a placeholder for aglets. The purpose of this interface is to provide a mechanism to control and limit direct access to aglets.

Method Index

 o activate()
Activates the aglet.
 o clone()
Clones the aglet and its proxy.
 o deactivate(long)
Deactivates the aglet.
 o delegateMessage(Message)
Delegates a message to the aglet
 o dispatch(URL)
 o dispose()
Disposes the aglet.
 o getAglet()
Gets the aglet that the proxy manages.
 o getAgletClassName()
Gets the aglet's class name.
 o getAgletID()
Gets the aglet's id
 o getAgletInfo()
 o getCodeBase()
Gets the codebase of the aglet in URL
 o getIdentifier()
Gets the aglet's identifier.
 o isActive()
Checks if the aglet is active or deactivated.
 o isRemote()
Checks if the aglet proxy is referencing a remote aglet.
 o isState(int)
Checks if the aglet
 o isValid()
Checks if the aglet proxy is invalidated or not.
 o sendAsyncMessage(Message)
Sends a message in asynchronous way.
 o sendMessage(Message)
Sends a message in synchronous way.

Methods

 o getAglet
  public abstract Aglet getAglet() throws InvalidAgletException
Gets the aglet that the proxy manages.
Returns:
the aglet
Throws: InvalidAgletException
if the aglet is not valid.
Throws: SecurityException
if you are not allowed to access the aglet.
 o getIdentifier
  public abstract AgletIdentifier getIdentifier() throws InvalidAgletException
Gets the aglet's identifier.
Returns:
the aglet's identifier.
Throws: InvalidAgletException
if the aglet is not valid.
 o getAgletID
  public abstract AgletID getAgletID() throws InvalidAgletException
Gets the aglet's id
Returns:
the aglet's id
Throws: InvalidAgletException
if the aglet is not valid.
 o getAgletClassName
  public abstract String getAgletClassName() throws InvalidAgletException
Gets the aglet's class name.
Returns:
the class name.
Throws: InvalidAgletException
if the aglet is not valid.
 o getAgletInfo
  public abstract AgletInfo getAgletInfo() throws InvalidAgletException
 o getCodeBase
  public abstract URL getCodeBase() throws InvalidAgletException
Gets the codebase of the aglet in URL
Returns:
the class URL.
Throws: InvalidAgletException
if the aglet is not valid.
 o clone
  public abstract Object clone() throws CloneNotSupportedException
Clones the aglet and its proxy. Note that the cloned aglet will get activated. If you like to get cloned aglet which is not activated, throw ThreadDeath exception in the onClone method.
Returns:
the new aglet proxy what holds cloned aglet.
Throws: CloneNotSupportedException
if the cloning fails.
Throws: InvalidAgletException
if the aglet is invalid.
Overrides:
clone in class Object
 o dispatch
  public abstract AgletProxy dispatch(URL url) throws IOException, AgletException
 o dispose
  public abstract void dispose() throws InvalidAgletException
Disposes the aglet.
Throws: InvalidAgletException
if the aglet is invalid.
 o deactivate
  public abstract void deactivate(long millisecounds) throws IOException, InvalidAgletException
Deactivates the aglet. The system may store the aglet in the spool (disk or memory depending on the server). The aglet will be re-activated later (at the given time or manually).
Parameters:
millisecounds - duration of the aglet deactivating.
Throws: InvalidAgletException
if the aglet is not valid.
Throws: IllegalArgumentException
if the minutes parameter is negative.
 o activate
  public abstract void activate() throws IOException, AgletException
Activates the aglet. This is a forced activation of a deactivated aglet.
Throws: IOException
if the activation failed
Throws: InvalidAgletException
if the aglet is not valid.
 o sendMessage
  public abstract Object sendMessage(Message msg) throws InvalidAgletException, NotHandledException, MessageException
Sends a message in synchronous way. This waits for finishing the message handing.
Parameters:
msg - a message to send
Returns:
the result object if any. null if not.
Throws: InvalidAgletException
if the aglet is not valid any longer.
Throws: NotHandledException
if the aglet didn't handle the the message.
Throws: MessageException
a exception which the handleMessage method raised.
 o sendAsyncMessage
  public abstract FutureReply sendAsyncMessage(Message msg) throws InvalidAgletException
Sends a message in asynchronous way.
Parameters:
msg - a message to send
Returns:
a future object that will give you the reply of the message.
Throws: InvalidAgletException
if the aglet is not valid any longer.
 o delegateMessage
  public abstract void delegateMessage(Message msg) throws InvalidAgletException
Delegates a message to the aglet
Parameters:
msg - a message to delegate
Throws: InvalidAgletException
if the aglet proxy is not valid.
 o isActive
  public abstract boolean isActive() throws InvalidAgletException
Checks if the aglet is active or deactivated.
Returns:
true if the aglet is active
Throws: InvalidAgletException
if the aglet is not valid.
 o isValid
  public abstract boolean isValid()
Checks if the aglet proxy is invalidated or not.
Returns:
true if the aglet proxy is valid. false if not.
 o isRemote
  public abstract boolean isRemote()
Checks if the aglet proxy is referencing a remote aglet.
Returns:
true if the aglet resides at the remote site
 o isState
  public abstract boolean isState(int type)
Checks if the aglet
See Also:
ACTIVE, INACTIVE

All Packages  Class Hierarchy  This Package  Previous  Next  Index