|
|||||||||||
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.jini.JiniBodyImpl
An adapter for a LocalBody to be able to receive jini calls. This helps isolate JINI-specific code into a small set of specific classes, thus enabling reuse if we one day decide to switch to anothe jini 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 |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
JiniBodyImpl()
|
|
JiniBodyImpl(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 body)
|
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 jiniBody)
Signals to this body that the body identified by id is now to a new jini 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 RandomPortSocketFactory factory
protected transient UniversalBody body
Constructor Detail |
public JiniBodyImpl() throws java.rmi.RemoteException
public JiniBodyImpl(UniversalBody body) throws java.rmi.RemoteException
Method Detail |
public void receiveRequest(Request r) throws java.io.IOException, RenegotiateSessionException
JiniBody
receiveRequest
in interface JiniBody
java.io.IOException
- if the request cannot be accepted
RenegotiateSessionException
public void receiveReply(Reply r) throws java.io.IOException
JiniBody
receiveReply
in interface JiniBody
java.io.IOException
- if the reply cannot be acceptedpublic java.lang.String getNodeURL()
JiniBody
getNodeURL
in interface JiniBody
public UniqueID getID()
JiniBody
getID
in interface JiniBody
public void updateLocation(UniqueID id, UniversalBody jiniBody) throws java.io.IOException
JiniBody
updateLocation
in interface JiniBody
id
- the id of the bodyjiniBody
- the stub to the new location
java.io.IOException
- if an exception occured during the jini communicationpublic void enableAC() throws java.io.IOException
JiniBody
enableAC
in interface JiniBody
java.io.IOException
public void disableAC() throws java.io.IOException
JiniBody
disableAC
in interface JiniBody
java.io.IOException
public void setImmediateService(java.lang.String methodName) throws java.io.IOException
JiniBody
setImmediateService
in interface JiniBody
java.io.IOException
public void unreferenced()
unreferenced
in interface java.rmi.server.Unreferenced
public void initiateSession(int type, UniversalBody body) throws java.io.IOException, CommunicationForbiddenException, AuthenticationException, RenegotiateSessionException, SecurityNotAvailableException
initiateSession
in interface JiniBody
java.io.IOException
CommunicationForbiddenException
AuthenticationException
RenegotiateSessionException
SecurityNotAvailableException
public void terminateSession(long sessionID) throws java.io.IOException, SecurityNotAvailableException
terminateSession
in interface JiniBody
java.io.IOException
SecurityNotAvailableException
public java.security.cert.X509Certificate getCertificate() throws SecurityNotAvailableException, java.io.IOException
getCertificate
in interface JiniBody
SecurityNotAvailableException
java.io.IOException
public ProActiveSecurityManager getProActiveSecurityManager() throws SecurityNotAvailableException, java.io.IOException
getProActiveSecurityManager
in interface JiniBody
SecurityNotAvailableException
java.io.IOException
public Policy getPolicyFrom(java.security.cert.X509Certificate certificate) throws SecurityNotAvailableException, java.io.IOException
getPolicyFrom
in interface JiniBody
SecurityNotAvailableException
java.io.IOException
public long startNewSession(Communication policy) throws SecurityNotAvailableException, java.io.IOException, RenegotiateSessionException
startNewSession
in interface JiniBody
SecurityNotAvailableException
java.io.IOException
RenegotiateSessionException
public ConfidentialityTicket negociateKeyReceiverSide(ConfidentialityTicket confidentialityTicket, long sessionID) throws SecurityNotAvailableException, KeyExchangeException, java.io.IOException
negociateKeyReceiverSide
in interface JiniBody
SecurityNotAvailableException
KeyExchangeException
java.io.IOException
public java.security.PublicKey getPublicKey() throws SecurityNotAvailableException, java.io.IOException
getPublicKey
in interface JiniBody
SecurityNotAvailableException
java.io.IOException
public byte[] randomValue(long sessionID, byte[] cl_rand) throws java.lang.Exception
randomValue
in interface JiniBody
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 JiniBody
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 JiniBody
java.lang.Exception
public Communication getPolicyTo(java.lang.String type, java.lang.String from, java.lang.String to) throws SecurityNotAvailableException, java.io.IOException
getPolicyTo
in interface JiniBody
SecurityNotAvailableException
java.io.IOException
public java.lang.String getVNName() throws java.io.IOException, SecurityNotAvailableException
getVNName
in interface JiniBody
java.io.IOException
SecurityNotAvailableException
public byte[] getCertificateEncoded() throws java.io.IOException, SecurityNotAvailableException
getCertificateEncoded
in interface JiniBody
java.io.IOException
SecurityNotAvailableException
public SecurityContext getPolicy(SecurityContext securityContext) throws java.io.IOException, SecurityNotAvailableException
getPolicy
in interface JiniBody
java.io.IOException
SecurityNotAvailableException
public java.util.ArrayList getEntities() throws SecurityNotAvailableException, java.io.IOException
getEntities
in interface JiniBody
SecurityNotAvailableException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |