|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.proactive.ext.mixedlocation.UniversalBodyWrapper
public class UniversalBodyWrapper
| Field Summary | |
|---|---|
protected long |
creationTime
|
protected UniqueID |
id
|
protected java.lang.String |
jobID
|
protected boolean |
stop
|
protected long |
time
|
protected UniversalBody |
wrappedBody
|
| Fields inherited from interface org.objectweb.proactive.core.body.UniversalBody |
|---|
bodyLogger |
| Constructor Summary | |
|---|---|
UniversalBodyWrapper(UniversalBody body,
long time)
Create a time-limited wrapper around a UniversalBody |
|
| Method Summary | |
|---|---|
void |
addNFEListener(NFEListener listener)
|
void |
createShortcut(Shortcut shortcut)
similar to the UniversalBody.updateLocation(org.objectweb.proactive.core.UniqueID, UniversalBody) method,
it allows direct communication to the target of a functional call, accross membranes of composite components. |
void |
disableAC()
Disables automatic continuation mechanism for this body |
void |
enableAC()
Enables automatic continuation mechanism for this body |
int |
fireNFE(NonFunctionalException e)
|
java.security.cert.X509Certificate |
getCertificate()
entity certificate |
byte[] |
getCertificateEncoded()
Entity's X509Certificate as byte array |
java.util.ArrayList<Entity> |
getEntities()
Retrieves all the entity's ID which contain this entity plus this entity ID. |
UniqueID |
getID()
Returns the UniqueID of this body This identifier is unique accross all JVMs |
java.lang.String |
getJobID()
|
java.lang.String |
getNodeURL()
Returns the url of the node this body is associated to The url of the node can change if the active object migrates |
SecurityContext |
getPolicy(SecurityContext securityContext)
Ask the entity to fill the securityContext parameters with its own policy according to the communication details contained in the given securityContext |
java.security.PublicKey |
getPublicKey()
entity public key |
BodyAdapter |
getRemoteAdapter()
Returns the remote friendly version of this body |
byte[][] |
publicKeyExchange(long sessionID,
byte[] my_pub,
byte[] my_cert,
byte[] sig_code)
exchange entity certificate and/or public key if certificate are not available |
byte[] |
randomValue(long sessionID,
byte[] cl_rand)
Exchange random value between client and server entity |
java.lang.Object |
receiveFTMessage(FTMessage ev)
For sending a non fonctional message to the FTManager linked to this object. |
int |
receiveReply(Reply r)
Receives a reply in response to a former request. |
int |
receiveRequest(Request request)
Receives a request for later processing. |
void |
removeImmediateService(java.lang.String methodName,
java.lang.Class[] parametersTypes)
Removes an immediate service for this body An immediate service is a method that will bw excecuted by the calling thread. |
void |
removeNFEListener(NFEListener listener)
|
void |
run()
|
byte[][] |
secretKeyExchange(long sessionID,
byte[] tmp,
byte[] tmp1,
byte[] tmp2,
byte[] tmp3,
byte[] tmp4)
this method sends encoded secret parameters to the target entity |
void |
setImmediateService(java.lang.String methodName)
For setting an immediate service for this body. |
void |
setImmediateService(java.lang.String methodName,
java.lang.Class[] parametersTypes)
Adds an immediate service for this body An immediate service is a method that will bw excecuted by the calling thread. |
long |
startNewSession(Communication policy)
start an unvalidated empty session |
void |
terminate()
Terminate the body. |
void |
terminateSession(long sessionID)
terminate a given session |
void |
updateLocation(UniqueID id,
UniversalBody body)
Signals to this body that the body identified by id is now to a new remote location. |
protected void |
updateServer()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected UniversalBody wrappedBody
protected long time
protected UniqueID id
protected boolean stop
protected long creationTime
protected java.lang.String jobID
| Constructor Detail |
|---|
public UniversalBodyWrapper(UniversalBody body,
long time)
body - the wrapped UniversalBodytime - the life expectancy of this wrapper in milliseconds| Method Detail |
|---|
public int receiveRequest(Request request)
throws java.io.IOException,
RenegotiateSessionException
UniversalBody
receiveRequest in interface UniversalBodyrequest - the request to process
java.io.IOException - if the request cannot be accepted
RenegotiateSessionException
public int receiveReply(Reply r)
throws java.io.IOException
UniversalBody
receiveReply in interface UniversalBodyr - the reply received
java.io.IOException - if the reply cannot be accepted
public void terminate()
throws java.io.IOException
UniversalBody
terminate in interface UniversalBodyjava.io.IOException - if a pb occurs during this method callUniversalBody.terminate()public java.lang.String getNodeURL()
UniversalBody
getNodeURL in interface UniversalBodypublic UniqueID getID()
UniversalBody
getID in interface UniversalBodypublic java.lang.String getJobID()
getJobID in interface Job
public void updateLocation(UniqueID id,
UniversalBody body)
throws java.io.IOException
UniversalBody
updateLocation in interface UniversalBodyid - the id of the bodybody - the stub to the new location
java.io.IOException - if a pb occurs during this method callpublic BodyAdapter getRemoteAdapter()
UniversalBody
getRemoteAdapter in interface UniversalBody
public void enableAC()
throws java.io.IOException
UniversalBody
enableAC in interface UniversalBodyjava.io.IOException - if a pb occurs during this method call
public void disableAC()
throws java.io.IOException
UniversalBody
disableAC in interface UniversalBodyjava.io.IOException - if a pb occurs during this method call
public void setImmediateService(java.lang.String methodName)
throws java.io.IOException
UniversalBody
setImmediateService in interface UniversalBodyjava.io.IOException - if a pb occurs during this method call
public void removeImmediateService(java.lang.String methodName,
java.lang.Class[] parametersTypes)
throws java.io.IOException
UniversalBody
removeImmediateService in interface UniversalBodymethodName - the name of the methodparametersTypes - the types of the parameters of the method
java.io.IOException - if a pb occurs during this method call
public void setImmediateService(java.lang.String methodName,
java.lang.Class[] parametersTypes)
throws java.io.IOException
UniversalBody
setImmediateService in interface UniversalBodymethodName - the name of the methodparametersTypes - the types of the parameters of the method
java.io.IOException - if a pb occurs during this method callprotected void updateServer()
public void run()
run in interface java.lang.Runnablepublic void addNFEListener(NFEListener listener)
addNFEListener in interface NFEProducerpublic void removeNFEListener(NFEListener listener)
removeNFEListener in interface NFEProducerpublic int fireNFE(NonFunctionalException e)
fireNFE in interface NFEProducer
public void terminateSession(long sessionID)
throws java.io.IOException,
SecurityNotAvailableException
SecurityEntity
terminateSession in interface SecurityEntitySecurityNotAvailableException - id security is not available
java.io.IOException
public java.security.cert.X509Certificate getCertificate()
throws java.io.IOException,
SecurityNotAvailableException
SecurityEntity
getCertificate in interface SecurityEntityjava.io.IOException - if communication fails
SecurityNotAvailableException - if security is not available
public long startNewSession(Communication policy)
throws java.io.IOException,
RenegotiateSessionException,
SecurityNotAvailableException
SecurityEntity
startNewSession in interface SecurityEntitypolicy - policy associated to the session
RenegotiateSessionException - if the session immediatly expires
SecurityNotAvailableException - if security is not available
java.io.IOException
public java.security.PublicKey getPublicKey()
throws java.io.IOException,
SecurityNotAvailableException
SecurityEntity
getPublicKey in interface SecurityEntitySecurityNotAvailableException
java.io.IOException
public byte[] randomValue(long sessionID,
byte[] cl_rand)
throws java.io.IOException,
SecurityNotAvailableException,
RenegotiateSessionException
SecurityEntity
randomValue in interface SecurityEntitysessionID - the session IDcl_rand - client random value
SecurityNotAvailableException - if the security is not available
RenegotiateSessionException - if the session has expired
java.io.IOException
public byte[][] publicKeyExchange(long sessionID,
byte[] my_pub,
byte[] my_cert,
byte[] sig_code)
throws java.io.IOException,
SecurityNotAvailableException,
RenegotiateSessionException,
KeyExchangeException
SecurityEntity
publicKeyExchange in interface SecurityEntitysessionID - the session IDmy_pub - encoded public keymy_cert - encoded certificatesig_code - encoded signature of previous paramaters
SecurityNotAvailableException - if the security is not available
RenegotiateSessionException - if the session has expired
KeyExchangeException - if a key data/length/algorithm is not supported
java.io.IOException
public byte[][] secretKeyExchange(long sessionID,
byte[] tmp,
byte[] tmp1,
byte[] tmp2,
byte[] tmp3,
byte[] tmp4)
throws java.io.IOException,
SecurityNotAvailableException,
RenegotiateSessionException
SecurityEntity
secretKeyExchange in interface SecurityEntitysessionID - session IDtmp - the AES key use to exchange secret messagetmp1 - Initilization parameters for the AES keytmp2 - MAC key for checking signature of future messagestmp3 - random value to prevent message replays by an external attackertmp4 - encoded signature of the previous parameters
java.io.IOException - if communication fails
SecurityNotAvailableException - if this entity does not support security
RenegotiateSessionException - if the session has expired or has been cancelled during this exchange
public byte[] getCertificateEncoded()
throws java.io.IOException,
SecurityNotAvailableException
SecurityEntity
getCertificateEncoded in interface SecurityEntityjava.io.IOException
SecurityNotAvailableException
public SecurityContext getPolicy(SecurityContext securityContext)
throws SecurityNotAvailableException,
java.io.IOException
SecurityEntity
getPolicy in interface SecurityEntitysecurityContext - communication details allowing the entity to
look for a matching policy
SecurityNotAvailableException - thrown the entity doest not support the security
java.io.IOException
public java.util.ArrayList<Entity> getEntities()
throws SecurityNotAvailableException,
java.io.IOException
SecurityEntity
getEntities in interface SecurityEntitySecurityNotAvailableException - if the target entity does not support security
java.io.IOException
public java.lang.Object receiveFTMessage(FTMessage ev)
throws java.io.IOException
UniversalBody
receiveFTMessage in interface UniversalBodyev - the message to send
java.io.IOException - if a pb occurs during this method callUniversalBody.receiveFTMessage(org.objectweb.proactive.core.body.ft.internalmsg.FTMessage)
public void createShortcut(Shortcut shortcut)
throws java.io.IOException
UniversalBodyUniversalBody.updateLocation(org.objectweb.proactive.core.UniqueID, UniversalBody) method,
it allows direct communication to the target of a functional call, accross membranes of composite components.
createShortcut in interface UniversalBodyshortcut - the shortcut to create
java.io.IOException - if a pb occurs during this method call
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||