javax.xml.rpc.encoding
Interface TypeMappingRegistry

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
TypeMappingRegistry

public interface TypeMappingRegistry
extends java.io.Serializable

The interface javax.xml.rpc.encoding.TypeMappingRegistry defines a registry for TypeMapping instances for the different encoding styles.

Version:
0.7

Method Summary
 void clear()
          Removes all TypeMappings and namespaceURIs from this TypeMappingRegistry.
 TypeMapping createTypeMapping()
          Creates a new empty TypeMapping object.
 TypeMapping getDefaultTypeMapping()
          Return the registered default TypeMapping instance
 java.lang.String[] getRegisteredNamespaces()
          Gets a list of namespace URIs registered with this TypeMappingRegistry.
 TypeMapping getTypeMapping(java.lang.String namespaceURI)
          Returns the registered TypeMapping for the specified namespace URI.
 TypeMapping register(java.lang.String namespace, TypeMapping mapping)
          Registers a TypeMapping instance with the TypeMappingRegistry.
 void registerDefault(TypeMapping mapping)
          Registers the TypeMapping instance that is default for all encoding styles and XML schema namespaces supported by the TypeMappingRegistry.
 boolean removeTypeMapping(TypeMapping mapping)
          Removes a TypeMapping from the TypeMappingRegistry.
 TypeMapping unregisterTypeMapping(java.lang.String namespaceURI)
          Unregisters a TypeMapping instance, if present, from the specified namespaceURI.
 

Method Detail

register

public TypeMapping register(java.lang.String namespace,
                            TypeMapping mapping)
Registers a TypeMapping instance with the TypeMappingRegistry. This method replaces any existing registered TypeMapping instance for the specified namespaceURI.
Parameters:
namespaceURI - - An encoding style or XML schema namespace specified as an URI. An example is "http://schemas.xmlsoap.org/soap/encoding/"
mapping - - TypeMapping instance
Returns:
Previous TypeMapping associated with the specified namespaceURI, or null if there was no TypeMapping associated with the specified namespaceURI
Throws:
JAXRPCException - - If there is any error in the registration of the TypeMapping for the specified namespace URI

registerDefault

public void registerDefault(TypeMapping mapping)
Registers the TypeMapping instance that is default for all encoding styles and XML schema namespaces supported by the TypeMappingRegistry. A default TypeMapping should include serializers and deserializers that are independent of and usable with any encoding style or XML namespaces. The 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 namespace URIs) override the default TypeMapping.

Parameters:
mapping - - TypeMapping instance
Throws:
JAXRPCException - - If there is any error in the registration of the TypeMapping for the specified namespace URI

getDefaultTypeMapping

public TypeMapping getDefaultTypeMapping()
Return the registered default TypeMapping instance
Returns:
TypeMapping or null

getTypeMapping

public TypeMapping getTypeMapping(java.lang.String namespaceURI)
Returns the registered TypeMapping for the specified namespace URI. If there is no registered TypeMapping for the specified namespaceURI, this method returns null.
Parameters:
namespaceURI - - Encoding style or XML schema namespace specified as an URI
Returns:
TypeMapping for the specified namespace URI or null

unregisterTypeMapping

public TypeMapping unregisterTypeMapping(java.lang.String namespaceURI)
Unregisters a TypeMapping instance, if present, from the specified namespaceURI.
Parameters:
namespaceURI - - Encoding style or XML schema namespace specified as an URI
Returns:
The registered TypeMapping or null.

removeTypeMapping

public boolean removeTypeMapping(TypeMapping mapping)
Removes a TypeMapping from the TypeMappingRegistry. A TypeMapping is associated with 1 or more namespaceURIs. This method unregisters the specified TypeMapping instance from all associated namespaceURIs and then removes this TypeMapping instance from the registry.
Parameters:
mapping - - TypeMapping to remove
Returns:
true if specified TypeMapping is removed from the TypeMappingRegistry; false if the specified TypeMapping was not in the TypeMappingRegistry

createTypeMapping

public TypeMapping createTypeMapping()
Creates a new empty TypeMapping object.
Returns:
TypeMapping instance.

getRegisteredNamespaces

public java.lang.String[] getRegisteredNamespaces()
Gets a list of namespace URIs registered with this TypeMappingRegistry.
Returns:
String[] containing names of all registered namespace URIs

clear

public void clear()
Removes all TypeMappings and namespaceURIs from this TypeMappingRegistry.


Copyright © 2001 Apache XML Project. All Rights Reserved.