Package javax.xml.rpc.handler
Interface MessageContext
-
- All Known Subinterfaces:
SOAPMessageContext
- All Known Implementing Classes:
MessageContext
public interface MessageContextThe interfaceMessageContextabstracts the message context that is processed by a handler in thehandlemethod.The
MessageContextinterface provides methods to manage a property set.MessageContextproperties enable handlers in a handler chain to share processing related state.- Version:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsProperty(java.lang.String name)Returns true if theMessageContextcontains a property with the specified name.java.lang.ObjectgetProperty(java.lang.String name)Gets the value of a specific property from theMessageContext.java.util.IteratorgetPropertyNames()Returns an Iterator view of the names of the properties in thisMessageContext.voidremoveProperty(java.lang.String name)Removes a property (name-value pair) from theMessageContext.voidsetProperty(java.lang.String name, java.lang.Object value)Sets the name and value of a property associated with theMessageContext.
-
-
-
Method Detail
-
setProperty
void setProperty(java.lang.String name, java.lang.Object value)Sets the name and value of a property associated with theMessageContext. If theMessageContextcontains a value of the same property, the old value is replaced.- Parameters:
name- ame of the property associated with theMessageContextvalue- Value of the property- Throws:
java.lang.IllegalArgumentException- If some aspect the property is prevents it from being stored in the contextjava.lang.UnsupportedOperationException- If this method is not supported.
-
getProperty
java.lang.Object getProperty(java.lang.String name)
Gets the value of a specific property from theMessageContext.- Parameters:
name- the name of the property whose value is to be retrieved- Returns:
- the value of the property
- Throws:
java.lang.IllegalArgumentException- if an illegal property name is specified
-
removeProperty
void removeProperty(java.lang.String name)
Removes a property (name-value pair) from theMessageContext.- Parameters:
name- the name of the property to be removed- Throws:
java.lang.IllegalArgumentException- if an illegal property name is specified
-
containsProperty
boolean containsProperty(java.lang.String name)
Returns true if theMessageContextcontains a property with the specified name.- Parameters:
name- Name of the property whose presense is to be tested- Returns:
- Returns true if the MessageContext contains the property; otherwise false
-
getPropertyNames
java.util.Iterator getPropertyNames()
Returns an Iterator view of the names of the properties in thisMessageContext.- Returns:
- Iterator for the property names
-
-