|
||||||||||
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
AgletRef
activate
in interface AgletRef
public void checkValidation() throws InvalidAgletException
checkValidation
in interface AgletRef
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AgletStub
java.lang.CloneNotSupportedException
- if the cloning fails.InvalidAgletException
- if the aglet is invalid.protected void deactivate(long duration) throws java.io.IOException
deactivate
in class AgletStub
duration
- the duration to sleep in milliseconds.AgletEception
- if can not deactivate the aglet.public void delegateMessage(Message msg) throws InvalidAgletException
delegateMessage
in interface AgletRef
msg
- 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 AgletStub
public void dispatchEvent(AgletEvent ev)
protected void dispose()
dispose
in class AgletStub
InvalidAgletException
- if the aglet is invalid.public java.lang.String getAddress() throws InvalidAgletException
getAddress
in interface AgletRef
public Aglet getAglet() throws InvalidAgletException
getAglet
in interface AgletRef
java.lang.SecurityException
- if the current execution is not allowed.protected AgletContext getAgletContext()
getAgletContext
in class AgletStub
public AgletInfo getAgletInfo()
getAgletInfo
in interface AgletRef
getAgletInfo
in class AgletStub
public java.security.cert.Certificate getCertificate() throws InvalidAgletException
protected MessageManager getMessageManager()
AgletStub
getMessageManager
in class AgletStub
com.ibm.aglet.AgletStub
InvalidAgletException
- if the aglet is not valid.aglet.MessageManager
public Name getName()
protected java.security.PermissionCollection getProtections()
getProtections
in class AgletStub
public Ref getRef(VirtualRef vref)
getRef
in interface Ref
public java.lang.String getRefClassName()
getRefClassName
in interface Ref
public java.lang.String getText()
getText
in class AgletStub
public boolean isActive()
isActive
in interface AgletRef
public boolean isRemote()
isRemote
in interface AgletRef
public boolean isState(int s)
isState
in interface AgletRef
public boolean isValid()
isValid
in interface AgletRef
protected void kill()
public void referenced()
referenced
in interface Ref
public void resume() throws AgletNotFoundException, InvalidAgletException, ShuttingDownException
AgletRef
resume
in interface AgletRef
public FutureReply sendFutureMessage(Message msg) throws InvalidAgletException
AgletRef
sendFutureMessage
in interface AgletRef
com.ibm.aglets.AgletRef
msg
- the message to sendpublic java.lang.Object sendMessage(Message msg) throws MessageException, InvalidAgletException, NotHandledException
AgletRef
sendMessage
in interface AgletRef
com.ibm.aglets.AgletRef
msg
- the message to sendpublic void sendOnewayMessage(Message msg) throws InvalidAgletException
AgletRef
sendOnewayMessage
in interface AgletRef
com.ibm.aglets.AgletRef
msg
- the message to sendprotected void setAglet(Aglet a)
setAglet
in class AgletStub
protected void setProtections(java.security.PermissionCollection newprotections)
setProtections
in class AgletStub
protections
- collection of protections about who can send
what kind of messages to the agletpublic void setRef(VirtualRef vref, java.io.ObjectInputStream s) throws java.io.IOException, java.lang.ClassNotFoundException
setRef
in interface Ref
protected void setText(java.lang.String text)
setText
in class AgletStub
text
- protected void snapshot() throws java.io.IOException
snapshot
in class AgletStub
java.io.IOException
- protected void subscribeMessage(java.lang.String kind)
subscribeMessage
in class AgletStub
protected void suspend(long duration) throws InvalidAgletException
suspend
in class AgletStub
duration
- the duration to sleep in milliseconds.InvalidAgletEception
- if can not suspend the aglet.public java.lang.String toString()
toString
in class java.lang.Object
public void unreferenced()
unreferenced
in interface Ref
protected void unsubscribeAllMessages()
unsubscribeAllMessages
in class AgletStub
protected 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 |