org.objectweb.proactive.core.body.http
Class HttpBodyAdapter
java.lang.Object
org.objectweb.proactive.core.body.BodyAdapter
org.objectweb.proactive.core.body.BodyAdapterImpl
org.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. |
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 |
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
HttpBodyAdapter
public HttpBodyAdapter()
HttpBodyAdapter
public HttpBodyAdapter(UniversalBody body)
throws ProActiveException
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.