|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--org.objectweb.proactive.core.body.rmi.RemoteBodyImpl
An adapter for a LocalBody to be able to receive remote calls. This helps isolate RMI-specific code into a small set of specific classes, thus enabling reuse if we one day decide to switch to anothe remote objects library.
Field Summary | |
protected UniversalBody |
body
The encapsulated local body transient to deal with custom serialization of requests. |
protected static RandomPortSocketFactory |
factory
A custom socket Factory |
protected static org.apache.log4j.Logger |
logger
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
RemoteBodyImpl()
|
|
RemoteBodyImpl(UniversalBody body)
|
Method Summary | |
void |
disableAC()
Disables automatic continuation mechanism for this body |
void |
enableAC()
Enables automatic continuation mechanism for this body |
java.security.cert.X509Certificate |
getCertificate()
|
byte[] |
getCertificateEncoded()
|
java.util.ArrayList |
getEntities()
|
UniqueID |
getID()
Returns the UniqueID of this body This identifier is unique accross all JVMs |
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)
|
Policy |
getPolicyFrom(java.security.cert.X509Certificate certificate)
|
Communication |
getPolicyTo(java.lang.String type,
java.lang.String from,
java.lang.String to)
|
ProActiveSecurityManager |
getProActiveSecurityManager()
|
java.security.PublicKey |
getPublicKey()
|
java.lang.String |
getVNName()
|
void |
initiateSession(int type,
UniversalBody rbody)
|
ConfidentialityTicket |
negociateKeyReceiverSide(ConfidentialityTicket confidentialityTicket,
long sessionID)
|
byte[][] |
publicKeyExchange(long sessionID,
UniversalBody distantBody,
byte[] my_pub,
byte[] my_cert,
byte[] sig_code)
|
byte[] |
randomValue(long sessionID,
byte[] cl_rand)
|
void |
receiveReply(Reply r)
Receives a reply in response to a former request. |
void |
receiveRequest(Request r)
Receives a request for later processing. |
byte[][] |
secretKeyExchange(long sessionID,
byte[] tmp,
byte[] tmp1,
byte[] tmp2,
byte[] tmp3,
byte[] tmp4)
|
void |
setImmediateService(java.lang.String methodName)
For setting an immediate service for this body. |
long |
startNewSession(Communication policy)
|
void |
terminateSession(long sessionID)
|
void |
unreferenced()
|
void |
updateLocation(UniqueID id,
UniversalBody remoteBody)
Signals to this body that the body identified by id is now to a new remote location. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger logger
protected static RandomPortSocketFactory factory
protected transient UniversalBody body
Constructor Detail |
public RemoteBodyImpl() throws java.rmi.RemoteException
public RemoteBodyImpl(UniversalBody body) throws java.rmi.RemoteException
Method Detail |
public void receiveRequest(Request r) throws java.io.IOException, RenegotiateSessionException
RemoteBody
receiveRequest
in interface RemoteBody
java.io.IOException
- if the request cannot be accepted
RenegotiateSessionException
public void receiveReply(Reply r) throws java.io.IOException
RemoteBody
receiveReply
in interface RemoteBody
java.io.IOException
- if the reply cannot be acceptedpublic java.lang.String getNodeURL()
RemoteBody
getNodeURL
in interface RemoteBody
public UniqueID getID()
RemoteBody
getID
in interface RemoteBody
public void updateLocation(UniqueID id, UniversalBody remoteBody) throws java.io.IOException
RemoteBody
updateLocation
in interface RemoteBody
id
- the id of the bodyremoteBody
- the stub to the new location
java.io.IOException
- if an exception occured during the remote communicationpublic void unreferenced()
unreferenced
in interface java.rmi.server.Unreferenced
public void enableAC() throws java.io.IOException
RemoteBody
enableAC
in interface RemoteBody
java.io.IOException
public void disableAC() throws java.io.IOException
RemoteBody
disableAC
in interface RemoteBody
java.io.IOException
public void setImmediateService(java.lang.String methodName) throws java.io.IOException
RemoteBody
setImmediateService
in interface RemoteBody
java.io.IOException
public void initiateSession(int type, UniversalBody rbody) throws java.io.IOException, CommunicationForbiddenException, AuthenticationException, RenegotiateSessionException, SecurityNotAvailableException
initiateSession
in interface RemoteBody
java.io.IOException
CommunicationForbiddenException
AuthenticationException
RenegotiateSessionException
SecurityNotAvailableException
public void terminateSession(long sessionID) throws java.io.IOException, SecurityNotAvailableException
terminateSession
in interface RemoteBody
java.io.IOException
SecurityNotAvailableException
public java.security.cert.X509Certificate getCertificate() throws SecurityNotAvailableException, java.io.IOException
getCertificate
in interface RemoteBody
SecurityNotAvailableException
java.io.IOException
public ProActiveSecurityManager getProActiveSecurityManager() throws SecurityNotAvailableException, java.io.IOException
getProActiveSecurityManager
in interface RemoteBody
SecurityNotAvailableException
java.io.IOException
public Policy getPolicyFrom(java.security.cert.X509Certificate certificate) throws SecurityNotAvailableException, java.io.IOException
getPolicyFrom
in interface RemoteBody
SecurityNotAvailableException
java.io.IOException
public long startNewSession(Communication policy) throws SecurityNotAvailableException, java.io.IOException, RenegotiateSessionException
startNewSession
in interface RemoteBody
SecurityNotAvailableException
java.io.IOException
RenegotiateSessionException
public ConfidentialityTicket negociateKeyReceiverSide(ConfidentialityTicket confidentialityTicket, long sessionID) throws SecurityNotAvailableException, KeyExchangeException, java.io.IOException
negociateKeyReceiverSide
in interface RemoteBody
SecurityNotAvailableException
KeyExchangeException
java.io.IOException
public java.security.PublicKey getPublicKey() throws SecurityNotAvailableException, java.io.IOException
getPublicKey
in interface RemoteBody
SecurityNotAvailableException
java.io.IOException
public byte[] randomValue(long sessionID, byte[] cl_rand) throws java.lang.Exception
randomValue
in interface RemoteBody
java.lang.Exception
public byte[][] publicKeyExchange(long sessionID, UniversalBody distantBody, byte[] my_pub, byte[] my_cert, byte[] sig_code) throws java.lang.Exception
publicKeyExchange
in interface RemoteBody
java.lang.Exception
public byte[][] secretKeyExchange(long sessionID, byte[] tmp, byte[] tmp1, byte[] tmp2, byte[] tmp3, byte[] tmp4) throws java.lang.Exception
secretKeyExchange
in interface RemoteBody
java.lang.Exception
public Communication getPolicyTo(java.lang.String type, java.lang.String from, java.lang.String to) throws java.io.IOException, SecurityNotAvailableException
getPolicyTo
in interface RemoteBody
java.io.IOException
SecurityNotAvailableException
public java.lang.String getVNName() throws java.io.IOException, SecurityNotAvailableException
getVNName
in interface RemoteBody
java.io.IOException
SecurityNotAvailableException
public byte[] getCertificateEncoded() throws java.io.IOException, SecurityNotAvailableException
getCertificateEncoded
in interface RemoteBody
java.io.IOException
SecurityNotAvailableException
public SecurityContext getPolicy(SecurityContext securityContext) throws java.io.IOException, SecurityNotAvailableException
getPolicy
in interface RemoteBody
java.io.IOException
SecurityNotAvailableException
public java.util.ArrayList getEntities() throws SecurityNotAvailableException, java.io.IOException
getEntities
in interface RemoteBody
SecurityNotAvailableException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |