View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package javax.xml.rpc.encoding;
17  
18  import java.util.Iterator;
19  
20  /**
21   * The javax.xml.rpc.encoding.SerializerFactory is a factory of
22   * the serializers. A SerializerFactory is registered with a
23   * TypeMapping object as part of the TypeMappingRegistry.
24   *
25   * @version 1.0
26   */
27  public interface SerializerFactory extends java.io.Serializable {
28  
29      /**
30       * Returns a Serializer for the specified XML processing mechanism type.
31       *
32       * @param mechanismType - XML processing mechanism type [TBD: definition
33       *              of valid constants]
34       *
35       * @return a <code>Serializer</code> for the specified XML processing
36       *              mechanism type
37       *
38       * @throws javax.xml.rpc.JAXRPCException
39       *              if <code>SerializerFactory</code> does not support the
40       *              specified XML processing mechanism
41       * @throws java.lang.IllegalArgumentException
42       *              if an invalid mechanism type is specified
43       */
44      public Serializer getSerializerAs(String mechanismType);
45  
46      /**
47       * Returns an Iterator over all XML processing mechanism types supported by
48       * this <code>SerializerFactory</code>.
49       *
50       * @return an Iterator over the mechanism types (<Code>String</code>s?)
51       */
52      public Iterator getSupportedMechanismTypes();
53  }
54