Class AttachmentsAdapter

java.lang.Object
org.apache.axis2.jaxws.handler.AttachmentsAdapter
All Implemented Interfaces:
Map<String,jakarta.activation.DataHandler>

public class AttachmentsAdapter extends Object implements Map<String,jakarta.activation.DataHandler>
The JAX-WS exposes attachment properties whose value is Map<String, DataHandler>. The String is the content-id and DataHandler is the data handler representing the attachment. The JAX-WS MessageContext stores attachments in an Axiom Attachments object located on the JAX-WS Message. This class, AttachmentAdapter, is an adapter between the Map<String, DataHandler> interface needed by the properties and the actual implementation. All useful function is delegated through the MessageContext, so that we only have one copy of the attachment information. To use this class, invoke the install method. This will create an AttachmentAdapter (if necessary) and install it on the property JAX-WS standard attachment property. (See BaseMessageContext.)
  • Method Details

    • install

      public static void install(MessageContext mc)
      Add the AttachmentAdapter as the property for the inbound or outbound attachment property
      Parameters:
      mc - MessageContext
    • clear

      public void clear()
      Specified by:
      clear in interface Map<String,jakarta.activation.DataHandler>
    • containsKey

      public boolean containsKey(Object key)
      Specified by:
      containsKey in interface Map<String,jakarta.activation.DataHandler>
    • containsValue

      public boolean containsValue(Object value)
      Specified by:
      containsValue in interface Map<String,jakarta.activation.DataHandler>
    • entrySet

      public Set<Map.Entry<String,jakarta.activation.DataHandler>> entrySet()
      Specified by:
      entrySet in interface Map<String,jakarta.activation.DataHandler>
    • get

      public jakarta.activation.DataHandler get(Object key)
      Specified by:
      get in interface Map<String,jakarta.activation.DataHandler>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Map<String,jakarta.activation.DataHandler>
    • keySet

      public Set<String> keySet()
      Specified by:
      keySet in interface Map<String,jakarta.activation.DataHandler>
    • put

      public jakarta.activation.DataHandler put(String key, jakarta.activation.DataHandler dh)
      Specified by:
      put in interface Map<String,jakarta.activation.DataHandler>
    • putAll

      public void putAll(Map<? extends String,? extends jakarta.activation.DataHandler> t)
      Specified by:
      putAll in interface Map<String,jakarta.activation.DataHandler>
    • remove

      public jakarta.activation.DataHandler remove(Object key)
      Specified by:
      remove in interface Map<String,jakarta.activation.DataHandler>
    • size

      public int size()
      Specified by:
      size in interface Map<String,jakarta.activation.DataHandler>
    • values

      public Collection<jakarta.activation.DataHandler> values()
      Specified by:
      values in interface Map<String,jakarta.activation.DataHandler>