|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.ibm.aglet.AgletStub
|
+--com.ibm.aglets.LocalAgletRef
Class LocalAgletRef is the implementation of AgletStub. The purpose of this class is to provide a mechanism to control the aglet.
| Method Summary | |
void |
activate()
Activate the aglet |
void |
checkValidation()
|
protected java.lang.Object |
clone()
Clones the aglet ref. |
protected void |
deactivate(long duration)
Deactivate aglet till the specified date. |
void |
delegateMessage(Message msg)
Delegates a message to the ref. |
protected void |
dispatch(Ticket ticket)
|
protected void |
dispatch(java.net.URL url)
|
void |
dispatchEvent(AgletEvent ev)
|
protected void |
dispose()
Disposes the aglet. |
java.lang.String |
getAddress()
Gets the address. |
Aglet |
getAglet()
Gets the aglet. |
protected AgletContext |
getAgletContext()
|
AgletInfo |
getAgletInfo()
Gets the information of the aglet |
java.security.cert.Certificate |
getCertificate()
Gets the Certificate of the aglet's class. |
protected MessageManager |
getMessageManager()
Gets the aglet's message manager object. |
Name |
getName()
|
protected java.security.PermissionCollection |
getProtections()
Gets the protections: permission collection about who can send what kind of messages to the aglet |
Ref |
getRef(VirtualRef vref)
|
java.lang.String |
getRefClassName()
|
java.lang.String |
getText()
Gets the current content of the Aglet's message line. |
boolean |
isActive()
Checks if it's valid or not. |
boolean |
isRemote()
Checks if it's remote or not. |
boolean |
isState(int s)
Check the state |
boolean |
isValid()
Checks if it's valid or not. |
protected void |
kill()
|
void |
referenced()
|
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 |
protected void |
setAglet(Aglet a)
|
protected void |
setProtections(java.security.PermissionCollection newprotections)
Sets the protections: permission collection about who can send what kind of messages to the aglet |
void |
setRef(VirtualRef vref,
java.io.ObjectInputStream s)
|
protected void |
setText(java.lang.String text)
Sets/Shows a text. |
protected void |
snapshot()
Checkpointing the snapshot of the aglet. |
protected void |
subscribeMessage(java.lang.String kind)
|
protected void |
suspend(long duration)
Suspend aglet for the specified amount of time. |
java.lang.String |
toString()
|
void |
unreferenced()
|
protected void |
unsubscribeAllMessages()
|
protected boolean |
unsubscribeMessage(java.lang.String kind)
|
void |
writeInfo(java.io.ObjectOutputStream s)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public void activate()
throws java.io.IOException,
InvalidAgletException,
AgletNotFoundException,
ShuttingDownException
AgletRefactivate in interface AgletRef
public void checkValidation()
throws InvalidAgletException
checkValidation in interface AgletRef
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class AgletStubjava.lang.CloneNotSupportedException - if the cloning fails.InvalidAgletException - if the aglet is invalid.
protected void deactivate(long duration)
throws java.io.IOException
deactivate in class AgletStubduration - the duration to sleep in milliseconds.AgletEception - if can not deactivate the aglet.
public void delegateMessage(Message msg)
throws InvalidAgletException
delegateMessage in interface AgletRefmsg - a message to delegateInvalidAgletException - if the aglet is not valid any longer.
protected void dispatch(Ticket ticket)
throws java.io.IOException,
RequestRefusedException
dispatch in class AgletStub
protected void dispatch(java.net.URL url)
throws java.io.IOException,
RequestRefusedException
dispatch in class AgletStubpublic void dispatchEvent(AgletEvent ev)
protected void dispose()
dispose in class AgletStubInvalidAgletException - if the aglet is invalid.
public java.lang.String getAddress()
throws InvalidAgletException
getAddress in interface AgletRef
public Aglet getAglet()
throws InvalidAgletException
getAglet in interface AgletRefjava.lang.SecurityException - if the current execution is not allowed.protected AgletContext getAgletContext()
getAgletContext in class AgletStubpublic AgletInfo getAgletInfo()
getAgletInfo in interface AgletRefgetAgletInfo in class AgletStub
public java.security.cert.Certificate getCertificate()
throws InvalidAgletException
protected MessageManager getMessageManager()
AgletStubgetMessageManager in class AgletStubcom.ibm.aglet.AgletStubInvalidAgletException - if the aglet is not valid.aglet.MessageManagerpublic Name getName()
protected java.security.PermissionCollection getProtections()
getProtections in class AgletStubpublic Ref getRef(VirtualRef vref)
getRef in interface Refpublic java.lang.String getRefClassName()
getRefClassName in interface Refpublic java.lang.String getText()
getText in class AgletStubpublic boolean isActive()
isActive in interface AgletRefpublic boolean isRemote()
isRemote in interface AgletRefpublic boolean isState(int s)
isState in interface AgletRefpublic boolean isValid()
isValid in interface AgletRefprotected void kill()
public void referenced()
referenced in interface Ref
public void resume()
throws AgletNotFoundException,
InvalidAgletException,
ShuttingDownException
AgletRefresume in interface AgletRef
public FutureReply sendFutureMessage(Message msg)
throws InvalidAgletException
AgletRefsendFutureMessage in interface AgletRefcom.ibm.aglets.AgletRefmsg - the message to send
public java.lang.Object sendMessage(Message msg)
throws MessageException,
InvalidAgletException,
NotHandledException
AgletRefsendMessage in interface AgletRefcom.ibm.aglets.AgletRefmsg - the message to send
public void sendOnewayMessage(Message msg)
throws InvalidAgletException
AgletRefsendOnewayMessage in interface AgletRefcom.ibm.aglets.AgletRefmsg - the message to sendprotected void setAglet(Aglet a)
setAglet in class AgletStubprotected void setProtections(java.security.PermissionCollection newprotections)
setProtections in class AgletStubprotections - collection of protections about who can send
what kind of messages to the aglet
public void setRef(VirtualRef vref,
java.io.ObjectInputStream s)
throws java.io.IOException,
java.lang.ClassNotFoundException
setRef in interface Refprotected void setText(java.lang.String text)
setText in class AgletStubtext -
protected void snapshot()
throws java.io.IOException
snapshot in class AgletStubjava.io.IOException - protected void subscribeMessage(java.lang.String kind)
subscribeMessage in class AgletStub
protected void suspend(long duration)
throws InvalidAgletException
suspend in class AgletStubduration - the duration to sleep in milliseconds.InvalidAgletEception - if can not suspend the aglet.public java.lang.String toString()
toString in class java.lang.Objectpublic void unreferenced()
unreferenced in interface Refprotected void unsubscribeAllMessages()
unsubscribeAllMessages in class AgletStubprotected boolean unsubscribeMessage(java.lang.String kind)
unsubscribeMessage in class AgletStub
public void writeInfo(java.io.ObjectOutputStream s)
throws java.io.IOException
writeInfo in interface Ref
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||