001    /*
002     * Copyright 2001-2004 The Apache Software Foundation.
003     * 
004     * Licensed under the Apache License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     * 
008     *      http://www.apache.org/licenses/LICENSE-2.0
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package javax.xml.rpc.encoding;
017    
018    import java.util.Iterator;
019    
020    /**
021     * The javax.xml.rpc.encoding.SerializerFactory is a factory of
022     * the serializers. A SerializerFactory is registered with a
023     * TypeMapping object as part of the TypeMappingRegistry.
024     *
025     * @version 1.0
026     */
027    public interface SerializerFactory extends java.io.Serializable {
028    
029        /**
030         * Returns a Serializer for the specified XML processing mechanism type.
031         *
032         * @param mechanismType - XML processing mechanism type [TBD: definition
033         *              of valid constants]
034         *
035         * @return a <code>Serializer</code> for the specified XML processing
036         *              mechanism type
037         *
038         * @throws javax.xml.rpc.JAXRPCException
039         *              if <code>SerializerFactory</code> does not support the
040         *              specified XML processing mechanism
041         * @throws java.lang.IllegalArgumentException
042         *              if an invalid mechanism type is specified
043         */
044        public Serializer getSerializerAs(String mechanismType);
045    
046        /**
047         * Returns an Iterator over all XML processing mechanism types supported by
048         * this <code>SerializerFactory</code>.
049         *
050         * @return an Iterator over the mechanism types (<Code>String</code>s?)
051         */
052        public Iterator getSupportedMechanismTypes();
053    }
054