org.apache.axis2.datasource.jaxb
Class JAXBAttachmentMarshaller

java.lang.Object
  extended by javax.xml.bind.attachment.AttachmentMarshaller
      extended by org.apache.axis2.datasource.jaxb.JAXBAttachmentMarshaller
Direct Known Subclasses:
JAXBAttachmentMarshaller

public class JAXBAttachmentMarshaller
extends javax.xml.bind.attachment.AttachmentMarshaller

An implementation of the JAXB AttachmentMarshaller that is used to handle binary data from JAXB and create populate the appropriate constructs on the MessageContext


Constructor Summary
JAXBAttachmentMarshaller(MessageContext msgContext, javax.xml.stream.XMLStreamWriter writer)
          Construct the JAXBAttachmentMarshaller that has access to the MessageContext
 
Method Summary
 void addDataHandler(javax.activation.DataHandler dh, java.lang.String cid)
          Inform the context that an Attachment (DataHandler, CID) is written.
 java.lang.String addMtomAttachment(byte[] data, int offset, int length, java.lang.String mimeType, java.lang.String namespace, java.lang.String localPart)
           
 java.lang.String addMtomAttachment(javax.activation.DataHandler data, java.lang.String namespace, java.lang.String localPart)
           
 java.lang.String addSwaRefAttachment(javax.activation.DataHandler data)
           
 boolean isMTOMEnabled()
           
 boolean isXOPPackage()
          Override isXOPPackaget to calculate the isXOPPackage setting
 void setDoingSWA()
          Indicate on the context that SWA attachments are encountered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXBAttachmentMarshaller

public JAXBAttachmentMarshaller(MessageContext msgContext,
                                javax.xml.stream.XMLStreamWriter writer)
Construct the JAXBAttachmentMarshaller that has access to the MessageContext

Parameters:
msgContext -
writer -
Method Detail

isXOPPackage

public boolean isXOPPackage()
Override isXOPPackaget to calculate the isXOPPackage setting

Overrides:
isXOPPackage in class javax.xml.bind.attachment.AttachmentMarshaller

addMtomAttachment

public java.lang.String addMtomAttachment(byte[] data,
                                          int offset,
                                          int length,
                                          java.lang.String mimeType,
                                          java.lang.String namespace,
                                          java.lang.String localPart)
Specified by:
addMtomAttachment in class javax.xml.bind.attachment.AttachmentMarshaller

addMtomAttachment

public java.lang.String addMtomAttachment(javax.activation.DataHandler data,
                                          java.lang.String namespace,
                                          java.lang.String localPart)
Specified by:
addMtomAttachment in class javax.xml.bind.attachment.AttachmentMarshaller

addSwaRefAttachment

public java.lang.String addSwaRefAttachment(javax.activation.DataHandler data)
Specified by:
addSwaRefAttachment in class javax.xml.bind.attachment.AttachmentMarshaller

isMTOMEnabled

public boolean isMTOMEnabled()
Returns:
if MTOM enabled calculated from the context information

setDoingSWA

public void setDoingSWA()
Indicate on the context that SWA attachments are encountered


addDataHandler

public void addDataHandler(javax.activation.DataHandler dh,
                           java.lang.String cid)
Inform the context that an Attachment (DataHandler, CID) is written.

Parameters:
dh -
cid -


Copyright © 2007 Apache Web Services Project. All Rights Reserved.