xsul.wsif
Interface WSIFMessage

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
WSIFMessageElement

public interface WSIFMessage
extends java.io.Serializable, java.lang.Cloneable

A WSIFMessage is a an interface representing a WSDL Message.

In WSDL, a Message describes the abstract type of the input or output to an operation. This is the corresponding WSIF class which represents in memory the actual input or output of an operation.

A WSIFMessage is a container for a set of named parts. The WSIFMessage interface separates the actual representation of the data from the abstract type defined by WSDL.

WSIFMessage implementations are free to represent the actual part data in any way that is convenient to them. This could be a simple HashMap as in the WSIFDefaultMessage implementation, or it could be something more complex, such as a stream or tree representation.

In addition to the containing parts, a WSIFMessage also has a message name. This can be used to distinguish between messages.

WSIFMessages are cloneable and serializable. If the parts set are not cloneable, the implementation should try to clone them using serialization. If the parts are not serializable either, then a CloneNotSupportedException will be thrown if cloning is attempted.

A WSIFMessage should be not created by directly instantiating a WSIFMessage, but should be created by calling one of the WSIFOperation.createInputMessage(), WSIFOperation.createOutputMessage(), or WSIFOperation.createFaultMessage() methods.

An instance of a WSIFMessage should only be used for the purpose it was created for, for example, a WSIFMessage created by the WSIFOperation#createInputMessage(String) should not be used as an output message. A WSIFMessage should only be used once, it should not be reused in any subsequent WSIFOperation requests.

Author:
Aleksander Slominski, Paul Fremantle, Matthew J. Duftler, Sanjiva Weerawarana, Nirmal Mukhi, Owen Burroughs , Ant Elder , Jeremy Hughes , Mark Whitlock

Method Summary
 java.lang.Object clone()
           
 boolean getBooleanPart(java.lang.String name)
           
 byte getBytePart(java.lang.String name)
           
 char getCharPart(java.lang.String name)
           
 double getDoublePart(java.lang.String name)
           
 float getFloatPart(java.lang.String name)
           
 int getIntPart(java.lang.String name)
           
 long getLongPart(java.lang.String name)
           
 java.lang.String getName()
          Get the name of this message.
 java.lang.Object getObjectPart(java.lang.String name)
           
 java.lang.Object getObjectPart(java.lang.String name, java.lang.Class sourceClass)
           
 short getShortPart(java.lang.String name)
           
 Iterable partNames()
          Return list of part names.
 Iterable parts()
          Create an iterator of the parts in this message.
 void setBooleanPart(java.lang.String name, boolean booleanPart)
           
 void setBytePart(java.lang.String name, byte bytePart)
           
 void setCharPart(java.lang.String name, char charPart)
           
 void setDoublePart(java.lang.String name, double doublePart)
           
 void setFloatPart(java.lang.String name, float floatPart)
           
 void setIntPart(java.lang.String name, int intPart)
           
 void setLongPart(java.lang.String name, long longPart)
           
 void setName(java.lang.String name)
          Set the name of this message.
 void setObjectPart(java.lang.String name, java.lang.Object part)
           
 void setShortPart(java.lang.String name, short shortPart)
           
 

Method Detail

getName

public java.lang.String getName()
Get the name of this message.


setName

public void setName(java.lang.String name)
Set the name of this message.


partNames

public Iterable partNames()
Return list of part names.

NOTE: part names are unordered.


parts

public Iterable parts()
Create an iterator of the parts in this message. Supercedes void getParts(Map).


getObjectPart

public java.lang.Object getObjectPart(java.lang.String name)
                               throws WSIFException
Throws:
WSIFException

getObjectPart

public java.lang.Object getObjectPart(java.lang.String name,
                                      java.lang.Class sourceClass)
                               throws WSIFException
Throws:
WSIFException

setObjectPart

public void setObjectPart(java.lang.String name,
                          java.lang.Object part)
                   throws WSIFException
Throws:
WSIFException

getCharPart

public char getCharPart(java.lang.String name)
                 throws WSIFException
Throws:
WSIFException

getBytePart

public byte getBytePart(java.lang.String name)
                 throws WSIFException
Throws:
WSIFException

getShortPart

public short getShortPart(java.lang.String name)
                   throws WSIFException
Throws:
WSIFException

getIntPart

public int getIntPart(java.lang.String name)
               throws WSIFException
Throws:
WSIFException

getLongPart

public long getLongPart(java.lang.String name)
                 throws WSIFException
Throws:
WSIFException

getFloatPart

public float getFloatPart(java.lang.String name)
                   throws WSIFException
Throws:
WSIFException

getDoublePart

public double getDoublePart(java.lang.String name)
                     throws WSIFException
Throws:
WSIFException

getBooleanPart

public boolean getBooleanPart(java.lang.String name)
                       throws WSIFException
Throws:
WSIFException

setCharPart

public void setCharPart(java.lang.String name,
                        char charPart)

setBytePart

public void setBytePart(java.lang.String name,
                        byte bytePart)

setShortPart

public void setShortPart(java.lang.String name,
                         short shortPart)

setIntPart

public void setIntPart(java.lang.String name,
                       int intPart)

setLongPart

public void setLongPart(java.lang.String name,
                        long longPart)

setFloatPart

public void setFloatPart(java.lang.String name,
                         float floatPart)

setDoublePart

public void setDoublePart(java.lang.String name,
                          double doublePart)

setBooleanPart

public void setBooleanPart(java.lang.String name,
                           boolean booleanPart)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException


IU Extreme! Lab (http://www.extreme.indiana.edu)