Package javax.xml.rpc.encoding
Interface TypeMappingRegistry
- All Superinterfaces:
Serializable
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
Modifier and TypeMethodDescriptionvoidclear()Removes all registered TypeMappings and encodingStyleURIs from this TypeMappingRegistry.Creates a new emptyTypeMappingobject.Gets the registered defaultTypeMappinginstance.String[]Returns a list of registered encodingStyle URIs in thisTypeMappingRegistryinstance.getTypeMapping(String encodingStyleURI) Returns the registeredTypeMappingfor the specified encodingStyle URI.register(String encodingStyleURI, TypeMapping mapping) Registers aTypeMappinginstance with theTypeMappingRegistry.voidregisterDefault(TypeMapping mapping) Registers theTypeMappinginstance that is default for all encoding styles supported by theTypeMappingRegistry.booleanremoveTypeMapping(TypeMapping mapping) Removes aTypeMappingfrom the TypeMappingRegistry.unregisterTypeMapping(String encodingStyleURI) Unregisters a TypeMapping instance, if present, from the specified encodingStyleURI.
-
Method Details
-
register
Registers aTypeMappinginstance with theTypeMappingRegistry. This method replaces any existing registeredTypeMappinginstance for the specifiedencodingStyleURI.- 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, ornullif there was no TypeMapping associated with the specifiedencodingStyleURI - Throws:
JAXRPCException- If there is an error in the registration of theTypeMappingfor the specifiedencodingStyleURI.
-
registerDefault
Registers theTypeMappinginstance that is default for all encoding styles supported by theTypeMappingRegistry. A defaultTypeMappingshould include serializers and deserializers that are independent of and usable with any encoding style. Successive invocations of theregisterDefaultmethod replace any existing defaultTypeMappinginstance.If the default
TypeMappingis registered, any other TypeMapping instances registered through theTypeMappingRegistry.registermethod (for a set of encodingStyle URIs) override the defaultTypeMapping.- Parameters:
mapping- TypeMapping instance- Throws:
JAXRPCException- If there is an error in the registration of the defaultTypeMapping
-
getDefaultTypeMapping
TypeMapping getDefaultTypeMapping()Gets the registered defaultTypeMappinginstance. This method returnsnullif there is no registered default TypeMapping in the registry.- Returns:
- The registered default
TypeMappinginstance ornull
-
getRegisteredEncodingStyleURIs
String[] getRegisteredEncodingStyleURIs()Returns a list of registered encodingStyle URIs in thisTypeMappingRegistryinstance.- Returns:
- Array of the registered encodingStyle URIs
-
getTypeMapping
Returns the registeredTypeMappingfor the specified encodingStyle URI. If there is no registeredTypeMappingfor the specifiedencodingStyleURI, this method returnsnull.- Parameters:
encodingStyleURI- Encoding style specified as an URI- Returns:
- TypeMapping for the specified encodingStyleURI or
null
-
createTypeMapping
TypeMapping createTypeMapping()Creates a new emptyTypeMappingobject.- Returns:
- TypeMapping instance
-
unregisterTypeMapping
Unregisters a TypeMapping instance, if present, from the specified encodingStyleURI.- Parameters:
encodingStyleURI- Encoding style specified as an URI- Returns:
TypeMappinginstance that has been unregistered ornullif there was no TypeMapping registered for the specifiedencodingStyleURI
-
removeTypeMapping
Removes aTypeMappingfrom the TypeMappingRegistry. ATypeMappingis associated with 1 or more encodingStyleURIs. This method unregisters the specifiedTypeMappinginstance from all associatedencodingStyleURIsand then removes this TypeMapping instance from the registry.- Parameters:
mapping- TypeMapping to be removed- Returns:
trueif specifiedTypeMappingis removed from the TypeMappingRegistry;falseif the specifiedTypeMappingwas not in theTypeMappingRegistry
-
clear
void clear()Removes all registered TypeMappings and encodingStyleURIs from this TypeMappingRegistry.
-