org.objectweb.proactive.core.body.ibis
Interface IbisRemoteBody

All Superinterfaces:
ibis.rmi.Remote
All Known Implementing Classes:
IbisRemoteBodyImpl

public interface IbisRemoteBody
extends ibis.rmi.Remote

An object implementing this interface provides the minimum service a body offers remotely. This interface is the glue with the RMI Remote interface that allow the body to be accessed remotely.

Since:
ProActive 0.9
Version:
1.0, 2001/10/23
Author:
ProActive Team
See Also:
Remote, UniversalBody

Method Summary
 void changeProxiedBody(Body newBody)
          Change the body referenced by this adapter
 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 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)
           
 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)
           
 int receiveFTMessage(FTMessage fte)
          For sending a non fonctionnal message to the FTManager linked to this object
 int receiveReply(Reply r)
          Receives a reply in response to a former request.
 int 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 terminate()
          Terminate the body.
 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 int receiveRequest(Request r)
                   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:
r - the request to process
Throws:
java.io.IOException - if the request cannot be accepted
RenegotiateSessionException

receiveReply

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

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

terminate

public void terminate()
               throws java.io.IOException
Terminate the body. After this call the body is no more alive and no more active although the active thread is not interrupted. The body is unuseable after this call.

Throws:
java.io.IOException

getNodeURL

public java.lang.String getNodeURL()
                            throws ibis.rmi.RemoteException
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
Throws:
ibi.rmi.RemoteException - if an exception occured during the remote communication
ibis.rmi.RemoteException

getID

public UniqueID getID()
               throws ibis.rmi.RemoteException
Returns the UniqueID of this body This identifier is unique accross all JVMs

Returns:
the UniqueID of this body
Throws:
ibi.rmi.RemoteException - if an exception occured during the remote communication
ibis.rmi.RemoteException

getJobID

public java.lang.String getJobID()
                          throws ibis.rmi.RemoteException
Throws:
ibis.rmi.RemoteException

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
Throws:
java.io.IOException - if an exception occured during the remote communication

enableAC

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

Throws:
java.io.IOException

disableAC

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

Throws:
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.

Throws:
java.io.IOException

initiateSession

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

terminateSession

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

getCertificate

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

getProActiveSecurityManager

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

getPolicyFrom

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

startNewSession

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

negociateKeyReceiverSide

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

getPublicKey

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

randomValue

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

publicKeyExchange

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

secretKeyExchange

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

getPolicyTo

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

getPolicy

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

getVNName

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

getCertificateEncoded

public byte[] getCertificateEncoded()
                             throws java.io.IOException,
                                    SecurityNotAvailableException
Returns:
object certificate as byte array
Throws:
java.io.IOException
SecurityNotAvailableException

getEntities

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

receiveFTMessage

public int receiveFTMessage(FTMessage fte)
                     throws java.io.IOException
For sending a non fonctionnal message to the FTManager linked to this object

Parameters:
fte - the recived message
Returns:
still not used
Throws:
java.io.IOException

changeProxiedBody

public void changeProxiedBody(Body newBody)
                       throws java.io.IOException
Change the body referenced by this adapter

Parameters:
newBody - the body referenced after the call
Throws:
java.io.IOException


Copyright ? April 2005 INRIA All Rights Reserved.