org.apache.cxf.message

## Class ExchangeImpl

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.concurrent.ConcurrentHashMap<String,Object>
    - - org.apache.cxf.message.ExchangeImpl

- All Implemented Interfaces:
    Serializable, ConcurrentMap<String,Object>, Map<String,Object>, Exchange, StringMap

      public class ExchangeImpl
      extends ConcurrentHashMap<String,Object>
      implements Exchange

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap

      `ConcurrentHashMap.KeySetView<K,V>`

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExchangeImpl()`
    `ExchangeImpl(ExchangeImpl ex)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `<T> T` | `get(Class<T> key)` Convenience method for storing/retrieving typed objects from the map.
    `Binding` | `getBinding()`
    `BindingOperationInfo` | `getBindingOperationInfo()`
    `Bus` | `getBus()`
    `Conduit` | `getConduit(Message message)`
    `Destination` | `getDestination()`
    `Endpoint` | `getEndpoint()`
    `Message` | `getInFaultMessage()`
    `Message` | `getInMessage()` Returns the inbound message for the exchange.
    `Message` | `getOutFaultMessage()`
    `Message` | `getOutMessage()` Returns the outbound message for the exchange.
    `Service` | `getService()`
    `Session` | `getSession()`
    `boolean` | `isOneWay()` Determines if the exchange is one-way.
    `boolean` | `isSynchronous()` Determines if the exchange requires the frontend to wait for a response.
    `<T> void` | `put(Class<T> key, T value)` Convenience method for storing/retrieving typed objects from the map.
    `Object` | `put(String key, Object value)`
    `void` | `putAll(Map<? extends String,?> m)`
    `<T> T` | `remove(Class<T> key)` Convenience method for removing typed objects from the map.
    `void` | `setConduit(Conduit c)`
    `void` | `setDestination(Destination d)`
    `void` | `setInFaultMessage(Message m)`
    `void` | `setInMessage(Message m)`
    `void` | `setOneWay(boolean b)`
    `void` | `setOutFaultMessage(Message m)`
    `void` | `setOutMessage(Message m)`
    `void` | `setSession(Session session)`
    `void` | `setSynchronous(boolean b)`

    - ### Methods inherited from class java.util.concurrent.ConcurrentHashMap

      `compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values`

    - ### Methods inherited from class java.util.AbstractMap

      `clone`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

- - ### Constructor Detail

    - #### ExchangeImpl

          public ExchangeImpl()

    - #### ExchangeImpl

          public ExchangeImpl(ExchangeImpl ex)

  - ### Method Detail

    - #### get

          public <T> T get(Class<T> key)

      Description copied from interface: `StringMap`
      Convenience method for storing/retrieving typed objects from the map. equivalent to: (T)get(key.getName());
      Specified by:
        `get` in interface `StringMap`
      Parameters:
        `key` - the key
      Returns:
        the value

    - #### putAll

          public void putAll(Map<? extends String,?> m)

      Specified by:
        `putAll` in interface `Map<String,Object>`
      Overrides:
        `putAll` in class `ConcurrentHashMap<String,Object>`

    - #### put

          public <T> void put(Class<T> key,
                              T value)

      Description copied from interface: `StringMap`
      Convenience method for storing/retrieving typed objects from the map. equivalent to: put(key.getName(), value);
      Specified by:
        `put` in interface `StringMap`
      Parameters:
        `key` - the key
        `value` - the value

    - #### put

          public Object put(String key,
                            Object value)

      Specified by:
        `put` in interface `Map<String,Object>`
      Overrides:
        `put` in class `ConcurrentHashMap<String,Object>`

    - #### remove

          public <T> T remove(Class<T> key)

      Description copied from interface: `StringMap`
      Convenience method for removing typed objects from the map. equivalent to: (T)remove(key.getName());
      Specified by:
        `remove` in interface `StringMap`
      Parameters:
        `key` - the key

    - #### getDestination

          public Destination getDestination()

      Specified by:
        `getDestination` in interface `Exchange`
      Returns:
        the associated incoming Destination (may be anonymous)

    - #### getInMessage

          public Message getInMessage()

      Description copied from interface: `Exchange`
      Returns the inbound message for the exchange. On the client-side, this is the response. On the server-side, this is the request.
      Specified by:
        `getInMessage` in interface `Exchange`
      Returns:
        the inbound message

    - #### getConduit

          public Conduit getConduit(Message message)

      Specified by:
        `getConduit` in interface `Exchange`
      Parameters:
        `message` - the associated message
      Returns:
        the associated outgoing Conduit (may be anonymous)

    - #### getOutMessage

          public Message getOutMessage()

      Description copied from interface: `Exchange`
      Returns the outbound message for the exchange. On the client-side, this is the request. On the server-side, this is the response. During the inbound message processing, the outbound message is null.
      Specified by:
        `getOutMessage` in interface `Exchange`
      Returns:
        the outbound message

    - #### getInFaultMessage

          public Message getInFaultMessage()

      Specified by:
        `getInFaultMessage` in interface `Exchange`

    - #### setInFaultMessage

          public void setInFaultMessage(Message m)

      Specified by:
        `setInFaultMessage` in interface `Exchange`

    - #### getOutFaultMessage

          public Message getOutFaultMessage()

      Specified by:
        `getOutFaultMessage` in interface `Exchange`

    - #### setOutFaultMessage

          public void setOutFaultMessage(Message m)

      Specified by:
        `setOutFaultMessage` in interface `Exchange`

    - #### setDestination

          public void setDestination(Destination d)

      Specified by:
        `setDestination` in interface `Exchange`
      Parameters:
        `d` - the associated incoming Destination

    - #### setInMessage

          public void setInMessage(Message m)

      Specified by:
        `setInMessage` in interface `Exchange`

    - #### setConduit

          public void setConduit(Conduit c)

      Specified by:
        `setConduit` in interface `Exchange`
      Parameters:
        `c` - the associated outgoing Conduit

    - #### setOutMessage

          public void setOutMessage(Message m)

      Specified by:
        `setOutMessage` in interface `Exchange`

    - #### isOneWay

          public boolean isOneWay()

      Description copied from interface: `Exchange`
      Determines if the exchange is one-way.
      Specified by:
        `isOneWay` in interface `Exchange`
      Returns:
        true if the exchange is known to be a one-way exchange

    - #### setOneWay

          public void setOneWay(boolean b)

      Specified by:
        `setOneWay` in interface `Exchange`
      Parameters:
        `b` - true if the exchange is known to be a one-way exchange

    - #### isSynchronous

          public boolean isSynchronous()

      Description copied from interface: `Exchange`
      Determines if the exchange requires the frontend to wait for a response. Transports can then optimize themselves to process the response immediately instead of using a background thread or similar.
      Specified by:
        `isSynchronous` in interface `Exchange`
      Returns:
        true if the frontend will wait for the response

    - #### setSynchronous

          public void setSynchronous(boolean b)

      Specified by:
        `setSynchronous` in interface `Exchange`

    - #### getSession

          public Session getSession()

      Specified by:
        `getSession` in interface `Exchange`

    - #### setSession

          public void setSession(Session session)

    - #### clear

          public void clear()

      Description copied from interface: `Exchange`
      Specified by:
        `clear` in interface `Map<String,Object>`
      Specified by:
        `clear` in interface `Exchange`
      Overrides:
        `clear` in class `ConcurrentHashMap<String,Object>`

    - #### getBus

          public Bus getBus()

      Specified by:
        `getBus` in interface `Exchange`

    - #### getEndpoint

          public Endpoint getEndpoint()

      Specified by:
        `getEndpoint` in interface `Exchange`

    - #### getService

          public Service getService()

      Specified by:
        `getService` in interface `Exchange`

    - #### getBinding

          public Binding getBinding()

      Specified by:
        `getBinding` in interface `Exchange`

    - #### getBindingOperationInfo

          public BindingOperationInfo getBindingOperationInfo()

      Specified by:
        `getBindingOperationInfo` in interface `Exchange`

Apache CXF