MessageContext (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.xml.rpc.handler Interface MessageContext

所有已知子接口:
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.

版本:
1.1
作者:
Rahul Sharma, Roberto Chinnici
另请参见:
Handler

方法摘要
 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.
 

方法详细信息

setProperty

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.

参数:
name - Name of the property associated with the MessageContext
value - Value of the property
抛出异常:
IllegalArgumentException - If some aspect of the property is prevents it from being stored in the context
UnsupportedOperationException - If this method is not supported.

getProperty

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

参数:
name - Name of the property whose value is to be retrieved
返回:
Value of the property
抛出异常:
IllegalArgumentException - if an illegal property name is specified

removeProperty

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

参数:
name - Name of the property to be removed
抛出异常:
IllegalArgumentException - if an illegal property name is specified

containsProperty

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

参数:
name - Name of the property whose presense is to be tested
返回:
Returns true if the MessageContext contains the property; otherwise false

getPropertyNames

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

返回:
Iterator for the property names

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.