com.ibm.aglets
Interface AgletRef

All Superinterfaces:
Ref
All Known Implementing Classes:
LocalAgletRef, RemoteAgletRef

public interface AgletRef
extends Ref


Method Summary
 void activate()
          Activate the aglet
 void checkValidation()
           
 void delegateMessage(Message msg)
          Delegates a message
 java.lang.String getAddress()
          Gets the address of the target aglet.
 Aglet getAglet()
          Gets the aglet.
 AgletInfo getAgletInfo()
          Gets the information of the aglet
 boolean isActive()
          Checks if it's active.
 boolean isRemote()
          Checks if it's valid.
 boolean isState(int s)
          Checks a state of the aglet.
 boolean isValid()
          Checks if it's valid.
 void resume()
          Resume the aglet
 FutureReply sendFutureMessage(Message msg)
          Sends a future message in asynchronous way.
 java.lang.Object sendMessage(Message msg)
          Sends a message in synchronous way.
 void sendOnewayMessage(Message msg)
          Sends an oneway message
 
Methods inherited from interface com.ibm.awb.weakref.Ref
getRef, getRefClassName, referenced, setRef, unreferenced, writeInfo
 

Method Detail

activate

public void activate()
              throws java.io.IOException,
                     AgletException
Activate the aglet

checkValidation

public void checkValidation()
                     throws InvalidAgletException

delegateMessage

public void delegateMessage(Message msg)
                     throws InvalidAgletException
Delegates a message

getAddress

public java.lang.String getAddress()
                            throws InvalidAgletException
Gets the address of the target aglet.
Returns:
the address

getAglet

public Aglet getAglet()
               throws InvalidAgletException
Gets the aglet. If the aglet is access protected it will require the right key to get access.
Returns:
the aglet
Throws:
java.lang.SecurityException - if the current execution is not allowed.

getAgletInfo

public AgletInfo getAgletInfo()
Gets the information of the aglet
Returns:
the AgletInfo of the aglet

isActive

public boolean isActive()
Checks if it's active.

isRemote

public boolean isRemote()
Checks if it's valid.

isState

public boolean isState(int s)
Checks a state of the aglet.

isValid

public boolean isValid()
Checks if it's valid.

resume

public void resume()
            throws AgletException
Resume the aglet

sendFutureMessage

public FutureReply sendFutureMessage(Message msg)
                              throws InvalidAgletException
Sends a future message in asynchronous way.
Parameters:
msg - the message to send

sendMessage

public java.lang.Object sendMessage(Message msg)
                             throws MessageException,
                                    InvalidAgletException,
                                    NotHandledException
Sends a message in synchronous way.
Parameters:
msg - the message to send

sendOnewayMessage

public void sendOnewayMessage(Message msg)
                       throws InvalidAgletException
Sends an oneway message
Parameters:
msg - the message to send