Package org.apache.axis2.jaxws.handler
Class AttachmentsAdapter
java.lang.Object
org.apache.axis2.jaxws.handler.AttachmentsAdapter
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.)
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()jakarta.activation.DataHandlerstatic voidAdd the AttachmentAdapter as the property for the inbound or outbound attachment propertybooleanisEmpty()keySet()jakarta.activation.DataHandlervoidjakarta.activation.DataHandlerintsize()Collection<jakarta.activation.DataHandler>values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
install
Add the AttachmentAdapter as the property for the inbound or outbound attachment property- Parameters:
mc- MessageContext
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,jakarta.activation.DataHandler>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,jakarta.activation.DataHandler>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-