Package javax.xml.rpc.handler
Interface MessageContext
- All Known Subinterfaces:
SOAPMessageContext
public interface MessageContext
The interface
MessageContext abstracts the message
context that is processed by a handler in the handle
method.
The MessageContext interface provides methods to
manage a property set. MessageContext properties
enable handlers in a handler chain to share processing related
state.
- Version:
- 1.1
- Author:
- Rahul Sharma, Roberto Chinnici
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsProperty(String name) Returns true if theMessageContextcontains a property with the specified name.getProperty(String name) Gets the value of a specific property from theMessageContextReturns an Iterator view of the names of the properties in thisMessageContextvoidremoveProperty(String name) Removes a property (name-value pair) from theMessageContextvoidsetProperty(String name, Object value) Sets the name and value of a property associated with theMessageContext.
-
Method Details
-
setProperty
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- Name of the property associated with theMessageContextvalue- Value of the property- Throws:
IllegalArgumentException- If some aspect of the property is prevents it from being stored in the contextUnsupportedOperationException- If this method is not supported.
-
getProperty
Gets the value of a specific property from theMessageContext- Parameters:
name- Name of the property whose value is to be retrieved- Returns:
- Value of the property
- Throws:
IllegalArgumentException- if an illegal property name is specified
-
removeProperty
Removes a property (name-value pair) from theMessageContext- Parameters:
name- Name of the property to be removed- Throws:
IllegalArgumentException- if an illegal property name is specified
-
containsProperty
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
Iterator getPropertyNames()Returns an Iterator view of the names of the properties in thisMessageContext- Returns:
- Iterator for the property names
-