|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.body.BodyAdapter
org.objectweb.proactive.core.body.BodyAdapterImpl
An adapter for a RemoteBody. The Adpater is the generic entry point for remote calls to a RemoteBody using different protocols such as RMI, RMISSH, IBIS, HTTP, JINI. This also allows to cache informations, and so to avoid crossing the network when calling some methods.
Field Summary | |
protected RemoteBody |
proxiedRemoteBody
The encapsulated RmiRemoteBody |
Fields inherited from class org.objectweb.proactive.core.body.BodyAdapter |
bodyID, jobID |
Fields inherited from interface org.objectweb.proactive.core.body.UniversalBody |
bodyLogger |
Constructor Summary | |
BodyAdapterImpl()
|
Method Summary | |
void |
addNFEListener(NFEListener listener)
|
void |
changeProxiedBody(Body newBody)
Change the body referenced by this adapter. |
protected void |
construct(RemoteBody remoteBody)
|
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 |
boolean |
equals(java.lang.Object o)
|
int |
fireNFE(NonFunctionalException e)
|
java.security.cert.X509Certificate |
getCertificate()
entity certificate |
byte[] |
getCertificateEncoded()
Entity's X509Certificate as byte array |
java.util.ArrayList |
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 |
int |
hashCode()
|
abstract UniversalBody |
lookup(java.lang.String url)
Looks-up an active object previously registered in a registry. |
byte[][] |
publicKeyExchange(long sessionID,
byte[] myPublicKey,
byte[] myCertificate,
byte[] signature)
exchange entity certificate and/or public key if certificate are not available |
byte[] |
randomValue(long sessionID,
byte[] clientRandomValue)
Exchange random value between client and server entity |
protected java.lang.Object |
readResolve()
|
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. |
abstract void |
register(java.lang.String url)
Registers an active object into protocol-specific registry. |
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)
|
byte[][] |
secretKeyExchange(long sessionID,
byte[] encodedAESKey,
byte[] encodedIVParameters,
byte[] encodedClientMacKey,
byte[] encodedLockData,
byte[] parametersSignature)
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 |
abstract void |
unregister(java.lang.String url)
Unregisters an active object previously registered into a registry. |
void |
updateLocation(UniqueID id,
UniversalBody body)
Signals to this body that the body identified by id is now to a new remote location. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected RemoteBody proxiedRemoteBody
Constructor Detail |
public BodyAdapterImpl()
Method Detail |
public void changeProxiedBody(Body newBody) throws java.io.IOException
changeProxiedBody
in class BodyAdapter
newBody
- the body referenced after the call
java.io.IOException
- if a pb occurs during this method callpublic abstract UniversalBody lookup(java.lang.String url) throws java.io.IOException
lookup
in class BodyAdapter
url
- the url the remote Body is registered to
java.io.IOException
- if the remote body cannot be found under the given url
or if the object found is not of type RemoteBodypublic abstract void register(java.lang.String url) throws java.io.IOException
register
in class BodyAdapter
url
- the url under which the remote body is registered.
java.io.IOException
- if the remote body cannot be registeredpublic abstract void unregister(java.lang.String url) throws java.io.IOException
unregister
in class BodyAdapter
url
- the url under which the active object is registered.
java.io.IOException
- if the remote object cannot be removed from the registrypublic boolean equals(java.lang.Object o)
public int hashCode()
protected void construct(RemoteBody remoteBody) throws ProActiveException
ProActiveException
public java.lang.String getJobID()
getJobID
in interface Job
Job.getJobID()
public int receiveRequest(Request request) throws java.io.IOException, RenegotiateSessionException
UniversalBody
receiveRequest
in interface UniversalBody
request
- the request to process
java.io.IOException
- if the request cannot be accepted
RenegotiateSessionException
UniversalBody.receiveRequest(org.objectweb.proactive.core.body.request.Request)
public int receiveReply(Reply r) throws java.io.IOException
UniversalBody
receiveReply
in interface UniversalBody
r
- the reply received
java.io.IOException
- if the reply cannot be acceptedUniversalBody.receiveReply(org.objectweb.proactive.core.body.reply.Reply)
public java.lang.String getNodeURL()
UniversalBody
getNodeURL
in interface UniversalBody
UniversalBody.getNodeURL()
public UniqueID getID()
UniversalBody
getID
in interface UniversalBody
UniversalBody.getID()
public void updateLocation(UniqueID id, UniversalBody body) throws java.io.IOException
UniversalBody
updateLocation
in interface UniversalBody
id
- the id of the bodybody
- the stub to the new location
java.io.IOException
- if a pb occurs during this method callUniversalBody.updateLocation(org.objectweb.proactive.core.UniqueID, org.objectweb.proactive.core.body.UniversalBody)
public void createShortcut(Shortcut shortcut) throws java.io.IOException
UniversalBody
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.
createShortcut
in interface UniversalBody
shortcut
- the shortcut to create
java.io.IOException
- if a pb occurs during this method callUniversalBody.createShortcut(org.objectweb.proactive.core.component.request.Shortcut)
public BodyAdapter getRemoteAdapter()
UniversalBody
getRemoteAdapter
in interface UniversalBody
UniversalBody.getRemoteAdapter()
public void terminate() throws java.io.IOException
UniversalBody
terminate
in interface UniversalBody
java.io.IOException
- if a pb occurs during this method callUniversalBody.terminate()
public void enableAC() throws java.io.IOException
UniversalBody
enableAC
in interface UniversalBody
java.io.IOException
- if a pb occurs during this method callUniversalBody.enableAC()
public void disableAC() throws java.io.IOException
UniversalBody
disableAC
in interface UniversalBody
java.io.IOException
- if a pb occurs during this method callUniversalBody.disableAC()
public void setImmediateService(java.lang.String methodName) throws java.io.IOException
UniversalBody
setImmediateService
in interface UniversalBody
java.io.IOException
- if a pb occurs during this method callUniversalBody.setImmediateService(java.lang.String)
public void setImmediateService(java.lang.String methodName, java.lang.Class[] parametersTypes) throws java.io.IOException
UniversalBody
setImmediateService
in interface UniversalBody
methodName
- the name of the methodparametersTypes
- the types of the parameters of the method
java.io.IOException
- if a pb occurs during this method callUniversalBody.setImmediateService(java.lang.String, java.lang.Class[])
public void removeImmediateService(java.lang.String methodName, java.lang.Class[] parametersTypes) throws java.io.IOException
UniversalBody
removeImmediateService
in interface UniversalBody
methodName
- the name of the methodparametersTypes
- the types of the parameters of the method
java.io.IOException
- if a pb occurs during this method callUniversalBody.removeImmediateService(java.lang.String, java.lang.Class[])
public java.security.cert.X509Certificate getCertificate() throws SecurityNotAvailableException, java.io.IOException
getCertificate
in interface SecurityEntity
SecurityNotAvailableException
- if security is not available
java.io.IOException
- if communication failspublic long startNewSession(Communication policy) throws SecurityNotAvailableException, RenegotiateSessionException, java.io.IOException
startNewSession
in interface SecurityEntity
policy
- policy associated to the session
SecurityNotAvailableException
- if security is not available
RenegotiateSessionException
- if the session immediatly expires
java.io.IOException
public java.security.PublicKey getPublicKey() throws SecurityNotAvailableException, java.io.IOException
getPublicKey
in interface SecurityEntity
SecurityNotAvailableException
java.io.IOException
public byte[] randomValue(long sessionID, byte[] clientRandomValue) throws SecurityNotAvailableException, RenegotiateSessionException, java.io.IOException
randomValue
in interface SecurityEntity
sessionID
- the session IDclientRandomValue
- 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[] myPublicKey, byte[] myCertificate, byte[] signature) throws SecurityNotAvailableException, RenegotiateSessionException, KeyExchangeException, java.io.IOException
publicKeyExchange
in interface SecurityEntity
sessionID
- the session IDmyPublicKey
- encoded public keymyCertificate
- encoded certificatesignature
- 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[] encodedAESKey, byte[] encodedIVParameters, byte[] encodedClientMacKey, byte[] encodedLockData, byte[] parametersSignature) throws SecurityNotAvailableException, RenegotiateSessionException, java.io.IOException
secretKeyExchange
in interface SecurityEntity
sessionID
- session IDencodedAESKey
- the AES key use to exchange secret messageencodedIVParameters
- Initilization parameters for the AES keyencodedClientMacKey
- MAC key for checking signature of future messagesencodedLockData
- random value to prevent message replays by an external attackerparametersSignature
- encoded signature of the previous parameters
SecurityNotAvailableException
- if this entity does not support security
RenegotiateSessionException
- if the session has expired or has been cancelled during this exchange
java.io.IOException
- if communication failspublic SecurityContext getPolicy(SecurityContext securityContext) throws SecurityNotAvailableException, java.io.IOException
getPolicy
in interface SecurityEntity
securityContext
- communication details allowing the entity to
look for a matching policy
SecurityNotAvailableException
- thrown the entity doest not support the security
java.io.IOException
public byte[] getCertificateEncoded() throws SecurityNotAvailableException, java.io.IOException
getCertificateEncoded
in interface SecurityEntity
SecurityNotAvailableException
java.io.IOException
public java.util.ArrayList getEntities() throws SecurityNotAvailableException, java.io.IOException
getEntities
in interface SecurityEntity
SecurityNotAvailableException
- if the target entity does not support security
java.io.IOException
public void terminateSession(long sessionID) throws SecurityNotAvailableException, java.io.IOException
terminateSession
in interface SecurityEntity
sessionID
-
SecurityNotAvailableException
- id security is not available
java.io.IOException
public java.lang.Object receiveFTMessage(FTMessage ev) throws java.io.IOException
UniversalBody
receiveFTMessage
in interface UniversalBody
ev
- the message to send
java.io.IOException
- if a pb occurs during this method callpublic void addNFEListener(NFEListener listener)
addNFEListener
in interface NFEProducer
public void removeNFEListener(NFEListener listener)
removeNFEListener
in interface NFEProducer
public int fireNFE(NonFunctionalException e)
fireNFE
in interface NFEProducer
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |