org.objectweb.proactive.core.body
Interface UniversalBody

All Known Subinterfaces:
Body
All Known Implementing Classes:
AbstractBody, AbstractUniversalBody, IbisRemoteBodyAdapter, JiniBodyAdapter, RemoteBodyAdapter, UniversalBodyWrapper

public interface UniversalBody

An object implementing this interface provides the minimum service a body offers remotely or locally. This interface is the generic version that is used remotely and locally. A body accessed from the same JVM offers all services of this interface, plus the services defined in the Body interface.

Since:
ProActive 0.9
Version:
1.0, 2001/10/23
Author:
ProActive Team
See Also:
Body, RemoteBodyAdapter

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()
           
 UniversalBody getRemoteAdapter()
          Returns the remote friendly version of this body
 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 request)
          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 updateLocation(UniqueID id, UniversalBody body)
          Signals to this body that the body identified by id is now to a new remote location.
 

Method Detail

receiveRequest

public void receiveRequest(Request request)
                    throws java.io.IOException,
                           RenegotiateSessionException
Receives a request for later processing. The call to this method is non blocking unless the body cannot temporary receive the request.

Parameters:
request - the request to process
Throws:
java.io.IOException - if the request cannot be accepted
RenegotiateSessionException

receiveReply

public void receiveReply(Reply r)
                  throws java.io.IOException
Receives a reply in response to a former request.

Throws:
java.io.IOException - if the reply cannot be accepted

getNodeURL

public 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

Returns:
the url of the node this body is associated to

getID

public UniqueID getID()
Returns the UniqueID of this body This identifier is unique accross all JVMs

Returns:
the UniqueID of this body

updateLocation

public void updateLocation(UniqueID id,
                           UniversalBody body)
                    throws java.io.IOException
Signals to this body that the body identified by id is now to a new remote location. The body given in parameter is a new stub pointing to this new location. This call is a way for a body to signal to his peer that it has migrated to a new location

Parameters:
id - the id of the body
body - the stub to the new location
java.io.IOException

getRemoteAdapter

public UniversalBody getRemoteAdapter()
Returns the remote friendly version of this body

Returns:
the remote friendly version of this body

enableAC

public void enableAC()
              throws java.io.IOException
Enables automatic continuation mechanism for this body

java.io.IOException

disableAC

public void disableAC()
               throws java.io.IOException
Disables automatic continuation mechanism for this body

java.io.IOException

setImmediateService

public void setImmediateService(java.lang.String methodName)
                         throws java.io.IOException
For setting an immediate service for this body. An immediate service is a method that will bw excecuted by the calling thread.

java.io.IOException

initiateSession

public void initiateSession(int type,
                            UniversalBody body)
                     throws java.io.IOException,
                            CommunicationForbiddenException,
                            AuthenticationException,
                            RenegotiateSessionException,
                            SecurityNotAvailableException
java.io.IOException
CommunicationForbiddenException
AuthenticationException
RenegotiateSessionException
SecurityNotAvailableException

terminateSession

public void terminateSession(long sessionID)
                      throws java.io.IOException,
                             SecurityNotAvailableException
java.io.IOException
SecurityNotAvailableException

getCertificate

public java.security.cert.X509Certificate getCertificate()
                                                  throws SecurityNotAvailableException,
                                                         java.io.IOException
SecurityNotAvailableException
java.io.IOException

getProActiveSecurityManager

public ProActiveSecurityManager getProActiveSecurityManager()
                                                     throws SecurityNotAvailableException,
                                                            java.io.IOException
SecurityNotAvailableException
java.io.IOException

getPolicyFrom

public Policy getPolicyFrom(java.security.cert.X509Certificate certificate)
                     throws SecurityNotAvailableException,
                            java.io.IOException
SecurityNotAvailableException
java.io.IOException

startNewSession

public long startNewSession(Communication policy)
                     throws SecurityNotAvailableException,
                            java.io.IOException,
                            RenegotiateSessionException
SecurityNotAvailableException
java.io.IOException
RenegotiateSessionException

negociateKeyReceiverSide

public ConfidentialityTicket negociateKeyReceiverSide(ConfidentialityTicket confidentialityTicket,
                                                      long sessionID)
                                               throws SecurityNotAvailableException,
                                                      KeyExchangeException,
                                                      java.io.IOException
SecurityNotAvailableException
KeyExchangeException
java.io.IOException

getPublicKey

public java.security.PublicKey getPublicKey()
                                     throws SecurityNotAvailableException,
                                            java.io.IOException
SecurityNotAvailableException
java.io.IOException

randomValue

public byte[] randomValue(long sessionID,
                          byte[] cl_rand)
                   throws SecurityNotAvailableException,
                          java.lang.Exception
SecurityNotAvailableException
java.lang.Exception

publicKeyExchange

public byte[][] publicKeyExchange(long sessionID,
                                  UniversalBody distantBody,
                                  byte[] my_pub,
                                  byte[] my_cert,
                                  byte[] sig_code)
                           throws SecurityNotAvailableException,
                                  java.lang.Exception,
                                  RenegotiateSessionException
SecurityNotAvailableException
java.lang.Exception
RenegotiateSessionException

secretKeyExchange

public byte[][] secretKeyExchange(long sessionID,
                                  byte[] tmp,
                                  byte[] tmp1,
                                  byte[] tmp2,
                                  byte[] tmp3,
                                  byte[] tmp4)
                           throws SecurityNotAvailableException,
                                  java.lang.Exception,
                                  RenegotiateSessionException
SecurityNotAvailableException
java.lang.Exception
RenegotiateSessionException

getPolicyTo

public Communication getPolicyTo(java.lang.String type,
                                 java.lang.String from,
                                 java.lang.String to)
                          throws SecurityNotAvailableException,
                                 java.io.IOException
SecurityNotAvailableException
java.io.IOException

getPolicy

public SecurityContext getPolicy(SecurityContext securityContext)
                          throws SecurityNotAvailableException,
                                 java.io.IOException
SecurityNotAvailableException
java.io.IOException

getVNName

public java.lang.String getVNName()
                           throws SecurityNotAvailableException,
                                  java.io.IOException
Returns:
name of the virtual node where the object has been created
SecurityNotAvailableException
java.io.IOException

getCertificateEncoded

public byte[] getCertificateEncoded()
                             throws SecurityNotAvailableException,
                                    java.io.IOException
Returns:
object's X509Certificate as byte array
SecurityNotAvailableException
java.io.IOException

getEntities

public java.util.ArrayList getEntities()
                                throws SecurityNotAvailableException,
                                       java.io.IOException
SecurityNotAvailableException
java.io.IOException


Copyright © April 2004 INRIA All Rights Reserved.