|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.rpc.encoding Interface TypeMapping
public interface TypeMapping
javax.xml.rpc.encoding.TypeMapping
是用于类型映射表示形式的基本接口。TypeMapping 实现类可以支持一个或多个编码样式。
对于支持的编码样式,TypeMapping 实例维护一个类型元组集{Java 类型, SerializerFactory
, DeserializerFactory
, XML 类型}。
version | 1.0 |
The javax.xml.rpc.encoding.TypeMapping
is the base
interface for the representation of a type mapping. A TypeMapping
implementation class may support one or more encoding styles.
For its supported encoding styles, a TypeMapping instance
maintains a set of tuples of the type {Java type,
SerializerFactory
,
DeserializerFactory
, XML type}.
- Version:
- 1.0
- Author:
- Rahul Sharma
Method Summary | |
---|---|
DeserializerFactory |
getDeserializer(Class javaType,
QName xmlType)
Gets the DeserializerFactory registered for the specified pair of Java type and XML data type. |
SerializerFactory |
getSerializer(Class javaType,
QName xmlType)
Gets the SerializerFactory registered for the specified pair of Java type and XML data type. |
String[] |
getSupportedEncodings()
Returns the encodingStyle URIs (as String[]) supported by this TypeMapping instance. |
boolean |
isRegistered(Class javaType,
QName xmlType)
Checks whether or not type mapping between specified XML type and Java type is registered. |
void |
register(Class javaType,
QName xmlType,
SerializerFactory sf,
DeserializerFactory dsf)
Registers SerializerFactory and DeserializerFactory for a specific type mapping between an XML type and Java type. |
void |
removeDeserializer(Class javaType,
QName xmlType)
Removes the DeserializerFactory registered for the specified pair of Java type and XML data type. |
void |
removeSerializer(Class javaType,
QName xmlType)
Removes the SerializerFactory registered for the specified pair of Java type and XML data type. |
void |
setSupportedEncodings(String[] encodingStyleURIs)
Sets the encodingStyle URIs supported by this TypeMapping instance. |
Method Detail |
---|
public String[]
getSupportedEncodings()
返回此 TypeMapping 实例支持的 encodingStyle URI(String[] 形式)。仅包含独立于编码样式的 Serializer 和 Deserializer 的 TypeMapping 从此方法返回 null
。
return | 受支持编码样式的 encodingStyle URI 所组成的数组 |
getSupportedEncodings
String[] getSupportedEncodings()
- Returns the encodingStyle URIs (as String[]) supported by
this TypeMapping instance. A TypeMapping that contains only
encoding style independent serializers and deserializers
returns
null
from this method. - Returns:
- Array of encodingStyle URIs for the supported encoding styles
public void
setSupportedEncodings(String[] encodingStyleURIs)
设置此 TypeMapping 实例支持的 encodingStyle URI。仅包含独立于编码的 Serializer 和 Deserializer 的 TypeMapping 要求使用 null
作为此方法的参数。
encodingStyleURIs | 受支持编码样式的 encodingStyle URI 所组成的数组 |
setSupportedEncodings
void setSupportedEncodings(String[] encodingStyleURIs)
- Sets the encodingStyle URIs supported by this TypeMapping
instance. A TypeMapping that contains only encoding
independent serializers and deserializers requires
null
as the parameter for this method. - Parameters:
encodingStyleURIs
- Array of encodingStyle URIs for the supported encoding styles
public boolean
isRegistered(Class<T> javaType, javax.xml.namespace.QName xmlType)
检查是否注册了指定 XML 类型与 Java 类型之间的类型映射。
javaType | Java 类型的类 |
QName | XML 数据类型的限定名称 |
return |
一个 boolean 值,如果注册了指定 XML 类型与 Java 类型之间的类型映射,则返回 true ;否则返回 false |
isRegistered
boolean isRegistered(Class javaType, QName xmlType)
- Checks whether or not type mapping between specified XML
type and Java type is registered.
- Parameters:
javaType
- Class of the Java typeQName
- Qualified name of the XML data type- Returns:
- boolean;
true
if type mapping between the specified XML type and Java type is registered; otherwisefalse
public void
register(Class<T> javaType, javax.xml.namespace.QName xmlType, SerializerFactory sf, DeserializerFactory dsf)
注册用于 XML 类型与 Java 类型之间的特定类型映射的 SerializerFactory 和 DeserializerFactory。此方法将替换任何现有的已注册 SerializerFactory DeserializerFactory 实例。
javaType | Java 类型的类 | |
QName | XML 数据类型的限定名称 | |
sf |
| |
dsf |
| |
Throws | JAXRPCException: 如果注册期间发生错误 |
register
void register(Class javaType, QName xmlType, SerializerFactory sf, DeserializerFactory dsf)
- Registers SerializerFactory and DeserializerFactory for a
specific type mapping between an XML type and Java type.
This method replaces any existing registered SerializerFactory
DeserializerFactory instances.
- Parameters:
javaType
- Class of the Java typeQName
- Qualified name of the XML data typesf
- SerializerFactorydsf
- DeserializerFactory- Throws:
JAXRPCException
- If any error during the registration
public SerializerFactory
getSerializer(Class<T> javaType, javax.xml.namespace.QName xmlType)
获取已针对指定的 Java 类型和 XML 数据类型对注册的 SerializerFactory。
javaType | Java 类型的类 |
QName | XML 数据类型的限定名称 |
return |
已注册的 SerializerFactory;如果没有任何已注册的工厂,则返回 null |
getSerializer
SerializerFactory getSerializer(Class javaType, QName xmlType)
- Gets the SerializerFactory registered for the specified
pair of Java type and XML data type.
- Parameters:
javaType
- Class of the Java typeQName
- Qualified name of the XML data type- Returns:
- Registered SerializerFactory or
null
if there is no registered factory
public DeserializerFactory
getDeserializer(Class<T> javaType, javax.xml.namespace.QName xmlType)
获取已针对指定的 Java 类型和 XML 数据类型对注册的 DeserializerFactory。
javaType | Java 类型的类 |
QName | XML 数据类型的限定名称 |
return |
已注册的 DeserializerFactory;如果没有任何已注册的工厂,则返回 null |
getDeserializer
DeserializerFactory getDeserializer(Class javaType, QName xmlType)
- Gets the DeserializerFactory registered for the specified
pair of Java type and XML data type.
- Parameters:
javaType
- Class of the Java typeQName
- Qualified name of the XML data type- Returns:
- Registered DeserializerFactory or
null
if there is no registered factory
public void
removeSerializer(Class<T> javaType, javax.xml.namespace.QName xmlType)
移除已针对指定的 Java 类型和 XML 数据类型对注册的 SerializerFactory。
Throws | JAXRPCException: 如果在移除已注册 SerializerFactory 的过程中出现错误 |
removeSerializer
void removeSerializer(Class javaType, QName xmlType)
- Removes the SerializerFactory registered for the specified
pair of Java type and XML data type.
- Throws:
JAXRPCException
- If there is error in removing the registered SerializerFactory
public void
removeDeserializer(Class<T> javaType, javax.xml.namespace.QName xmlType)
移除已针对指定的 Java 类型和 XML 数据类型类注册的 DeserializerFactory。
Throws | JAXRPCException: 如果在移除已注册 DeserializerFactory 的过程中出现错误 |
removeDeserializer
void removeDeserializer(Class javaType, QName xmlType)
- Removes the DeserializerFactory registered for the specified
pair of Java type and XML data type.
- Throws:
JAXRPCException
- If there is error in removing the registered DeserializerFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!