站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 webservice API Documentation 英文版文档

MessageContextImpl (JBossWS API) - JBoss 4.0.1 sp1 webservice API Documentation 英文版文档


org.jboss.webservice.handler
Class MessageContextImpl

java.lang.Object
  extended byorg.jboss.webservice.handler.MessageContextImpl
All Implemented Interfaces:
javax.xml.rpc.handler.MessageContext

public class MessageContextImpl
extends Object
implements javax.xml.rpc.handler.MessageContext

The message context that is processed by a handler in the handle method.

Provides methods to manage a property set. MessageContext properties enable handlers in a handler chain to share processing related state.

Since:
06-May-2004
Author:
Thomas.Diesler@jboss.org

Constructor Summary
MessageContextImpl()
           
 
Method Summary
 boolean containsProperty(String name)
          Returns true if the MessageContext contains a property with the specified name.
 Object getProperty(String name)
          Gets the value of a specific property from the MessageContext
 Iterator getPropertyNames()
          Returns an Iterator view of the names of the properties in this MessageContext
 void removeProperty(String name)
          Removes a property (name-value pair) from the MessageContext
 void setProperty(String name, Object value)
          Sets the name and value of a property associated with the MessageContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageContextImpl

public MessageContextImpl()
Method Detail

containsProperty

public boolean containsProperty(String name)
Returns true if the MessageContext contains a property with the specified name.

Specified by:
containsProperty in interface javax.xml.rpc.handler.MessageContext
Parameters:
name - Name of the property whose presense is to be tested
Returns:
Returns true if the MessageContext contains the property; otherwise false

getProperty

public Object getProperty(String name)
Gets the value of a specific property from the MessageContext

Specified by:
getProperty in interface javax.xml.rpc.handler.MessageContext
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

getPropertyNames

public Iterator getPropertyNames()
Returns an Iterator view of the names of the properties in this MessageContext

Specified by:
getPropertyNames in interface javax.xml.rpc.handler.MessageContext
Returns:
Iterator for the property names

removeProperty

public void removeProperty(String name)
Removes a property (name-value pair) from the MessageContext

Specified by:
removeProperty in interface javax.xml.rpc.handler.MessageContext
Parameters:
name - Name of the property to be removed
Throws:
IllegalArgumentException - if an illegal property name is specified

setProperty

public void setProperty(String name,
                        Object value)
Sets the name and value of a property associated with the MessageContext. If the MessageContext contains a value of the same property, the old value is replaced.

Specified by:
setProperty in interface javax.xml.rpc.handler.MessageContext
Parameters:
name - Name of the property associated with the MessageContext
value - Value of the property
Throws:
IllegalArgumentException - If some aspect of the property is prevents it from being stored in the context
UnsupportedOperationException - If this method is not supported.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.