org.apache.axis2.jaxws.handler
Class AttachmentsAdapter

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

public class AttachmentsAdapter
extends java.lang.Object
implements java.util.Map<java.lang.String,javax.activation.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.)


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set<java.util.Map.Entry<java.lang.String,javax.activation.DataHandler>> entrySet()
           
 javax.activation.DataHandler get(java.lang.Object key)
           
static void install(MessageContext mc)
          Add the AttachmentAdapter as the property for the inbound or outbound attachment property
 boolean isEmpty()
           
 java.util.Set<java.lang.String> keySet()
           
 javax.activation.DataHandler put(java.lang.String key, javax.activation.DataHandler dh)
           
 void putAll(java.util.Map<? extends java.lang.String,? extends javax.activation.DataHandler> t)
           
 javax.activation.DataHandler remove(java.lang.Object key)
           
 int size()
           
 java.util.Collection<javax.activation.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
equals, hashCode
 

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 interface java.util.Map<java.lang.String,javax.activation.DataHandler>

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,javax.activation.DataHandler>> entrySet()
Specified by:
entrySet in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

get

public javax.activation.DataHandler get(java.lang.Object key)
Specified by:
get in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

keySet

public java.util.Set<java.lang.String> keySet()
Specified by:
keySet in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

put

public javax.activation.DataHandler put(java.lang.String key,
                                        javax.activation.DataHandler dh)
Specified by:
put in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

putAll

public void putAll(java.util.Map<? extends java.lang.String,? extends javax.activation.DataHandler> t)
Specified by:
putAll in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

remove

public javax.activation.DataHandler remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

size

public int size()
Specified by:
size in interface java.util.Map<java.lang.String,javax.activation.DataHandler>

values

public java.util.Collection<javax.activation.DataHandler> values()
Specified by:
values in interface java.util.Map<java.lang.String,javax.activation.DataHandler>


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