TypeMappingRegistry (Java EE 5)

Java EE API


javax.xml.rpc.encoding Interface TypeMappingRegistry

All Superinterfaces:
Serializable

public interface TypeMappingRegistry
extends Serializable

Implements: java.io.Serializable

接口 javax.xml.rpc.encoding.TypeMappingRegistry 定义用于各种编码样式的 TypeMapping 实例的注册表。
英文文档:

The interface javax.xml.rpc.encoding.TypeMappingRegistry defines a registry of TypeMapping instances for various encoding styles.

Version:
1.0
Author:
Rahul Sharma

Method Summary
 void
 TypeMapping
 TypeMapping
 String[]
 TypeMapping
 TypeMapping
 void
 boolean
 TypeMapping
 

Method Detail

public TypeMapping register(String encodingStyleURI, TypeMapping mapping)
TypeMappingRegistry 注册 TypeMapping 实例。此方法替代任何现有的已注册 TypeMapping 实例,以获取指定的 encodingStyleURI
encodingStyleURI 指定为 URI 的编码样式。例如 "http://schemas.xmlsoap.org/soap/encoding/"
mapping TypeMapping 实例
return 与指定 encodingStyleURI 关联的旧 TypeMapping;如果没有任何与指定 encodingStyleURI 关联的 TypeMapping,则返回 null
ThrowsJAXRPCException: 如果注册指定 encodingStyleURITypeMapping 的过程中发现错误。
英文文档:

register

TypeMapping register(String encodingStyleURI,
                     TypeMapping mapping)
Registers a TypeMapping instance with the TypeMappingRegistry. This method replaces any existing registered TypeMapping instance for the specified encodingStyleURI.

Parameters:
encodingStyleURI - An encoding style specified as an URI. An example is "http://schemas.xmlsoap.org/soap/encoding/"
mapping - TypeMapping instance
Returns:
Previous TypeMapping associated with the specified encodingStyleURI, or null if there was no TypeMapping associated with the specified encodingStyleURI
Throws:
JAXRPCException - If there is an error in the registration of the TypeMapping for the specified encodingStyleURI.

public void registerDefault(TypeMapping mapping)
注册 TypeMapping 实例,该实例是 TypeMappingRegistry 支持的所有编码样式的默认值。默认 TypeMapping 应该包含独立于任何编码样式并能与任何编码样式一起使用的 Serializer 和 Deserializer。连续调用 registerDefault 方法将替换任何现有的默认 TypeMapping 实例。

如果注册了默认的 TypeMapping,那么通过 TypeMappingRegistry.register 方法(用于 encodingStyle URI 集合)注册的其他 TypeMapping 实例都将重写默认的 TypeMapping

mapping TypeMapping 实例
ThrowsJAXRPCException: 如果注册默认 TypeMapping 的过程中发现错误

英文文档:

registerDefault

void registerDefault(TypeMapping mapping)
Registers the TypeMapping instance that is default for all encoding styles supported by the TypeMappingRegistry. A default TypeMapping should include serializers and deserializers that are independent of and usable with any encoding style. Successive invocations of the registerDefault method replace any existing default TypeMapping instance.

If the default TypeMapping is registered, any other TypeMapping instances registered through the TypeMappingRegistry.register method (for a set of encodingStyle URIs) override the default TypeMapping.

Parameters:
mapping - TypeMapping instance
Throws:
JAXRPCException - If there is an error in the registration of the default TypeMapping

public TypeMapping getDefaultTypeMapping()
获取已注册的默认 TypeMapping 实例。如果注册表中没有任何已注册的默认 TypeMapping,则此方法返回 null
return 已注册的默认 TypeMapping 实例或 null
英文文档:

getDefaultTypeMapping

TypeMapping getDefaultTypeMapping()
Gets the registered default TypeMapping instance. This method returns null if there is no registered default TypeMapping in the registry.

Returns:
The registered default TypeMapping instance or null

public String[] getRegisteredEncodingStyleURIs()
返回此 TypeMappingRegistry 实例中已注册 encodingStyle URI 所组成的列表。
return 已注册 encodingStyle URI 所组成的数组
英文文档:

getRegisteredEncodingStyleURIs

String[] getRegisteredEncodingStyleURIs()
Returns a list of registered encodingStyle URIs in this TypeMappingRegistry instance.

Returns:
Array of the registered encodingStyle URIs

public TypeMapping getTypeMapping(String encodingStyleURI)
返回用于指定 encodingStyle URI 的已注册 TypeMapping。如果没有任何用于指定 encodingStyleURI 的已注册 TypeMapping,则此方法返回 null
encodingStyleURI 指定为 URI 的编码样式
return 指定 encodingStyleURI 的 TypeMapping 或 null
英文文档:

getTypeMapping

TypeMapping getTypeMapping(String encodingStyleURI)
Returns the registered TypeMapping for the specified encodingStyle URI. If there is no registered TypeMapping for the specified encodingStyleURI, this method returns null.

Parameters:
encodingStyleURI - Encoding style specified as an URI
Returns:
TypeMapping for the specified encodingStyleURI or null

public TypeMapping createTypeMapping()
创建一个新的空 TypeMapping 对象。
return TypeMapping 实例
英文文档:

createTypeMapping

TypeMapping createTypeMapping()
Creates a new empty TypeMapping object.

Returns:
TypeMapping instance

public TypeMapping unregisterTypeMapping(String encodingStyleURI)
从指定的 encodingStyleURI 中注销某个 TypeMapping 实例(如果存在)。
encodingStyleURI 指定为 URI 的编码样式
return 已经注销的 TypeMapping 实例;如果没有任何用于指定 encodingStyleURI 的已注册 TypeMapping,则返回 null
英文文档:

unregisterTypeMapping

TypeMapping unregisterTypeMapping(String encodingStyleURI)
Unregisters a TypeMapping instance, if present, from the specified encodingStyleURI.

Parameters:
encodingStyleURI - Encoding style specified as an URI
Returns:
TypeMapping instance that has been unregistered or null if there was no TypeMapping registered for the specified encodingStyleURI

public boolean removeTypeMapping(TypeMapping mapping)
从 TypeMappingRegistry 中移除 TypeMappingTypeMapping 与一个或多个 encodingStyleURI 关联。此方法注销所有关联 encodingStyleURIs 中的指定 TypeMapping 实例,然后从注册表中移除此 TypeMapping 实例。
mapping 将要移除的 TypeMapping
return 如果从 TypeMappingRegistry 中移除了指定的 TypeMapping,则返回 true;如果指定的 TypeMapping 不在 TypeMappingRegistry 中,则返回 false
英文文档:

removeTypeMapping

boolean removeTypeMapping(TypeMapping mapping)
Removes a TypeMapping from the TypeMappingRegistry. A TypeMapping is associated with 1 or more encodingStyleURIs. This method unregisters the specified TypeMapping instance from all associated encodingStyleURIs and then removes this TypeMapping instance from the registry.

Parameters:
mapping - TypeMapping to be removed
Returns:
true if specified TypeMapping is removed from the TypeMappingRegistry; false if the specified TypeMapping was not in the TypeMappingRegistry

public void clear()
从此 TypeMappingRegistry 中移除所有已注册的 TypeMapping 和 encodingStyleURI。
英文文档:

clear

void clear()
Removes all registered TypeMappings and encodingStyleURIs from this TypeMappingRegistry.



Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!