Package org.apache.axis2.jaxws.handler
Class AttachmentsAdapter
- java.lang.Object
-
- org.apache.axis2.jaxws.handler.AttachmentsAdapter
-
- All Implemented Interfaces:
Map<String,DataHandler>
public class AttachmentsAdapter extends Object implements Map<String,DataHandler>
The JAX-WS exposes attachment properties whose value is Map. 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 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<String,DataHandler>>
entrySet()
DataHandler
get(Object key)
static void
install(MessageContext mc)
Add the AttachmentAdapter as the property for the inbound or outbound attachment propertyboolean
isEmpty()
Set<String>
keySet()
DataHandler
put(String key, DataHandler dh)
void
putAll(Map<? extends String,? extends DataHandler> t)
DataHandler
remove(Object key)
int
size()
Collection<DataHandler>
values()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
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 interfaceMap<String,DataHandler>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<String,DataHandler>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<String,DataHandler>
-
entrySet
public Set<Map.Entry<String,DataHandler>> entrySet()
- Specified by:
entrySet
in interfaceMap<String,DataHandler>
-
get
public DataHandler get(Object key)
- Specified by:
get
in interfaceMap<String,DataHandler>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceMap<String,DataHandler>
-
put
public DataHandler put(String key, DataHandler dh)
- Specified by:
put
in interfaceMap<String,DataHandler>
-
putAll
public void putAll(Map<? extends String,? extends DataHandler> t)
- Specified by:
putAll
in interfaceMap<String,DataHandler>
-
remove
public DataHandler remove(Object key)
- Specified by:
remove
in interfaceMap<String,DataHandler>
-
size
public int size()
- Specified by:
size
in interfaceMap<String,DataHandler>
-
values
public Collection<DataHandler> values()
- Specified by:
values
in interfaceMap<String,DataHandler>
-
-