org.objectweb.proactive.core.body.http
Class HttpBodyAdapter

java.lang.Object
  extended byorg.objectweb.proactive.core.body.BodyAdapter
      extended byorg.objectweb.proactive.core.body.BodyAdapterImpl
          extended byorg.objectweb.proactive.core.body.http.HttpBodyAdapter
All Implemented Interfaces:
java.lang.Cloneable, Job, NFEProducer, SecurityEntity, java.io.Serializable, UniversalBody

public class HttpBodyAdapter
extends BodyAdapterImpl

An HTTP adapter for a RemoteBody. The Adpater is the generic entry point for remote calls to a RemoteBody using HTTP. This also allows to cache informations, and so to avoid crossing the network when calling some methods.

Since:
ProActive 2.2
Author:
ProActiveTeam
See Also:
smartProxy Pattern., Serialized Form

Field Summary
protected static java.util.Hashtable urnBodys
          an Hashtable containing all the http adapters registered.
 
Fields inherited from class org.objectweb.proactive.core.body.BodyAdapterImpl
proxiedRemoteBody
 
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
HttpBodyAdapter()
           
HttpBodyAdapter(UniversalBody body)
           
 
Method Summary
static UniversalBody getBodyFromUrn(java.lang.String urn)
          Gets a body from an urn in the table that mps urns and bodies
 UniversalBody lookup(java.lang.String urn)
          Looks-up an active object previously registered in the bodys table .
 void register(java.lang.String urn)
          Registers an active object into the table of body.
 void unregister(java.lang.String urn)
          Unregisters an active object previously registered into the bodys table
 
Methods inherited from class org.objectweb.proactive.core.body.BodyAdapterImpl
addNFEListener, changeProxiedBody, construct, createShortcut, disableAC, enableAC, equals, fireNFE, getCertificate, getCertificateEncoded, getEntities, getID, getJobID, getNodeURL, getPolicy, getPublicKey, getRemoteAdapter, hashCode, publicKeyExchange, randomValue, readResolve, receiveFTMessage, receiveReply, receiveRequest, removeImmediateService, removeNFEListener, secretKeyExchange, setImmediateService, setImmediateService, startNewSession, terminate, terminateSession, updateLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

urnBodys

protected static transient java.util.Hashtable urnBodys
an Hashtable containing all the http adapters registered. They can be retrieved thanks to the ProActive.lookupActive method

Constructor Detail

HttpBodyAdapter

public HttpBodyAdapter()

HttpBodyAdapter

public HttpBodyAdapter(UniversalBody body)
                throws ProActiveException
Method Detail

register

public void register(java.lang.String urn)
              throws java.io.IOException
Registers an active object into the table of body.

Specified by:
register in class BodyAdapterImpl
Parameters:
urn - The urn of the body (in fact his url + his name)
Throws:
java.io.IOException - if the remote body cannot be registered

unregister

public void unregister(java.lang.String urn)
                throws java.io.IOException
Unregisters an active object previously registered into the bodys table

Specified by:
unregister in class BodyAdapterImpl
Parameters:
urn - the urn under which the active object has been registered
Throws:
java.io.IOException - if the remote object cannot be removed from the registry

lookup

public UniversalBody lookup(java.lang.String urn)
                     throws java.io.IOException
Looks-up an active object previously registered in the bodys table .

Specified by:
lookup in class BodyAdapterImpl
Parameters:
urn - the urn (in fact its url + name) the remote Body is registered to
Returns:
a UniversalBody
Throws:
java.io.IOException - if the remote body cannot be found under the given url or if the object found is not of type RemoteBody

getBodyFromUrn

public static UniversalBody getBodyFromUrn(java.lang.String urn)
Gets a body from an urn in the table that mps urns and bodies

Parameters:
urn - The urn of the body
Returns:
the body mapping the urn


Copyright 2001-2005 INRIA All Rights Reserved.