org.objectweb.proactive.ext.webservices.utils
Class ProActiveXMLUtils

java.lang.Object
  extended byorg.objectweb.proactive.ext.webservices.utils.ProActiveXMLUtils

public class ProActiveXMLUtils
extends java.lang.Object

ProActive HTTP Utilities class

Author:
virginie

Field Summary
static java.lang.String ACTION_EXCEPTION
           
static java.lang.String MESSAGE
           
static java.lang.String NO_SUCH_OBJECT
           
static java.lang.String OK
           
static java.lang.String PROACTIVE_ACTION
           
static java.lang.String PROACTIVE_MESSAGE
           
static java.lang.String PROACTIVE_OAID
           
static java.lang.String PROACTIVE_OBJECT
           
static java.lang.String RUNTIME_REPLY
           
static java.lang.String RUNTIME_REQUEST
           
static java.lang.String SERVICE_REQUEST_CONTENT_TYPE
           
static java.lang.String SERVICE_REQUEST_URI
           
 
Constructor Summary
ProActiveXMLUtils()
           
 
Method Summary
static java.lang.Object deserializeObject(byte[] buffer)
          Unmarshall an object from a byte array
static Body getBody(UniqueID id)
          Search a Body matching with a given unique ID
static byte[] getMessage(java.lang.Object obj)
           
static java.lang.Object sendMessage(java.lang.String url, int port, java.lang.Object obj, java.lang.String action)
          Sends a message to the given url This message contains a serialized object.
static byte[] serializeObject(java.lang.Object o)
          Serialize an object into a byte array
static java.lang.Object unwrapp(byte[] msg, java.lang.String action)
          Unmarshalles a message and performs an action according to the action field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE

public static final java.lang.String MESSAGE
See Also:
Constant Field Values

RUNTIME_REQUEST

public static final java.lang.String RUNTIME_REQUEST
See Also:
Constant Field Values

RUNTIME_REPLY

public static final java.lang.String RUNTIME_REPLY
See Also:
Constant Field Values

PROACTIVE_MESSAGE

public static final java.lang.String PROACTIVE_MESSAGE
See Also:
Constant Field Values

PROACTIVE_ACTION

public static final java.lang.String PROACTIVE_ACTION
See Also:
Constant Field Values

PROACTIVE_OBJECT

public static final java.lang.String PROACTIVE_OBJECT
See Also:
Constant Field Values

PROACTIVE_OAID

public static final java.lang.String PROACTIVE_OAID
See Also:
Constant Field Values

OK

public static final java.lang.String OK
See Also:
Constant Field Values

NO_SUCH_OBJECT

public static final java.lang.String NO_SUCH_OBJECT
See Also:
Constant Field Values

ACTION_EXCEPTION

public static final java.lang.String ACTION_EXCEPTION
See Also:
Constant Field Values

SERVICE_REQUEST_URI

public static final java.lang.String SERVICE_REQUEST_URI
See Also:
Constant Field Values

SERVICE_REQUEST_CONTENT_TYPE

public static final java.lang.String SERVICE_REQUEST_CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

ProActiveXMLUtils

public ProActiveXMLUtils()
Method Detail

serializeObject

public static byte[] serializeObject(java.lang.Object o)
Serialize an object into a byte array

Parameters:
o - The object you want to serialize

deserializeObject

public static java.lang.Object deserializeObject(byte[] buffer)
Unmarshall an object from a byte array

Parameters:
buffer - The byte array containing the serialized object

getMessage

public static byte[] getMessage(java.lang.Object obj)

sendMessage

public static java.lang.Object sendMessage(java.lang.String url,
                                           int port,
                                           java.lang.Object obj,
                                           java.lang.String action)
                                    throws java.lang.Exception,
                                           HTTPRemoteException
Sends a message to the given url This message contains a serialized object.

Parameters:
url - The targeted url
port - The destination port
obj - The objet contained in the message
action - What to do with this object ?
Throws:
java.lang.Exception
HTTPRemoteException

unwrapp

public static java.lang.Object unwrapp(byte[] msg,
                                       java.lang.String action)
                                throws java.lang.Exception
Unmarshalles a message and performs an action according to the action field

Parameters:
msg - The message contained in a byte array
action - The action to perform with this message
Throws:
java.lang.Exception

getBody

public static Body getBody(UniqueID id)
Search a Body matching with a given unique ID

Parameters:
id - The unique id of the body we are searching for
Returns:
The body associated with the ID


Copyright ? October 2004 INRIA All Rights Reserved.