org.apache.wsif.providers.jca
Class WSIFMessage_JCAStreamable

java.lang.Object
  extended byorg.apache.wsif.base.WSIFDefaultMessage
      extended byorg.apache.wsif.providers.jca.WSIFMessage_JCA
          extended byorg.apache.wsif.providers.jca.WSIFMessage_JCAStreamable
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, WSIFMessage

public class WSIFMessage_JCAStreamable
extends WSIFMessage_JCA

The class WSIFMessage_JCAStreamable is a specialized version of the WSIFMessage_JCA to support Resource Adapters using javax.resource.cci.Streamable.

Author:
Michael Beisiegel, Piotr Przybylski , John Green
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wsif.providers.jca.WSIFMessage_JCA
FAULT_MESSAGE, INPUT_MESSAGE, OUTPUT_MESSAGE
 
Constructor Summary
WSIFMessage_JCAStreamable(javax.wsdl.Definition aDefinition, javax.wsdl.Binding aBinding, java.lang.String aOperationName, java.lang.String aInputName, java.lang.String aOutputName, int aMessageType)
           
 
Method Summary
 java.lang.Object getObjectPart(java.lang.String partName)
          Returns object part with the given name.
 java.lang.Object getObjectPart(java.lang.String partName, java.lang.Class sourceClass)
          Returns object part with the given name and requested representation.
 java.util.Iterator getPartNames()
          Return list of part names.
 java.util.Iterator getParts()
          Return an iterator of the parts in the message.
 void read(java.io.InputStream inputStream)
          The method to read input stream and create message parts.
 void write(java.io.OutputStream outputStream)
          Writes the contents of the message parts into the OutputStream.
 
Methods inherited from class org.apache.wsif.providers.jca.WSIFMessage_JCA
clone, getRecordName, getRecordShortDescription, setInteractionSpec, setRecordName, setRecordShortDescription
 
Methods inherited from class org.apache.wsif.base.WSIFDefaultMessage
deep, getBooleanPart, getBytePart, getCharPart, getDoublePart, getFloatPart, getIntPart, getLongPart, getMessageDefinition, getName, getRepresentationStyle, getShortPart, setBooleanPart, setBytePart, setCharPart, setDoublePart, setFloatPart, setIntPart, setLongPart, setMessageDefinition, setName, setObjectPart, setParts, setRepresentationStyle, setShortPart, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WSIFMessage_JCAStreamable

public WSIFMessage_JCAStreamable(javax.wsdl.Definition aDefinition,
                                 javax.wsdl.Binding aBinding,
                                 java.lang.String aOperationName,
                                 java.lang.String aInputName,
                                 java.lang.String aOutputName,
                                 int aMessageType)
See Also:
WSIFMessage_JCA.WSIFMessage_JCA(Definition, Binding, String, String, String, int)
Method Detail

read

public void read(java.io.InputStream inputStream)
          throws java.io.IOException
The method to read input stream and create message parts. For each part in the message (as defined in WSDL), with exception of parts representing ConnectionSpec and InteractionSpec properties, the format handler is created and its read() method is passed the inputStream. The parts creation is delayed until they are needed (i.e. when the client invokes getObjectPart). In this method only the part's format handler is created and stored.

Throws:
java.io.IOException
See Also:
javax.resource.cci.Streamable#read(InputStream)

write

public void write(java.io.OutputStream outputStream)
           throws java.io.IOException
Writes the contents of the message parts into the OutputStream. For each part in the message (as defined in WSDL), except parts representing interactionSpec properties, the format handler is created, part is set on the format handler and its write method is invoked. The format handlers are stored in the table.

Throws:
java.io.IOException
See Also:
javax.resource.cci.Streamable#write(OutputStream)

getObjectPart

public java.lang.Object getObjectPart(java.lang.String partName)
Returns object part with the given name. If the part had already been created, returns it. If there is a format handler for this part, the object part is obtained from it and returned, otherwise it creates the format handler and returns the object parts form it.

Specified by:
getObjectPart in interface WSIFMessage
Overrides:
getObjectPart in class WSIFDefaultMessage
See Also:
WSIFMessage.getObjectPart(String)

getObjectPart

public java.lang.Object getObjectPart(java.lang.String partName,
                                      java.lang.Class sourceClass)
Returns object part with the given name and requested representation. If the part had already been created, it is returned. If there is a format handler for this part, it gets the object part from the format handler and returns it, otherwise the format handler is created and its object part is returned.

Specified by:
getObjectPart in interface WSIFMessage
Overrides:
getObjectPart in class WSIFDefaultMessage
See Also:
WSIFMessage.getObjectPart(String)

getPartNames

public java.util.Iterator getPartNames()
Description copied from interface: WSIFMessage
Return list of part names.

NOTE: part names are unordered.

Specified by:
getPartNames in interface WSIFMessage
Overrides:
getPartNames in class WSIFDefaultMessage
See Also:
WSIFMessage.getPartNames()

getParts

public java.util.Iterator getParts()
Description copied from class: WSIFDefaultMessage
Return an iterator of the parts in the message. Supercedes void getParts(Map)

Specified by:
getParts in interface WSIFMessage
Overrides:
getParts in class WSIFDefaultMessage
See Also:
WSIFMessage.getParts()


Copyright ? 2002, 2006 Apache XML Project. All Rights Reserved.