Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
TypeFactory |
|
| 1.0;1 |
1 | /* |
|
2 | * Copyright 1999,2005 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 org.apache.xmlrpc.common; |
|
17 | ||
18 | import org.apache.ws.commons.util.NamespaceContextImpl; |
|
19 | import org.apache.xmlrpc.parser.TypeParser; |
|
20 | import org.apache.xmlrpc.serializer.TypeSerializer; |
|
21 | import org.xml.sax.SAXException; |
|
22 | ||
23 | ||
24 | /** A type factory creates serializers or handlers, based on the object |
|
25 | * type. |
|
26 | */ |
|
27 | public interface TypeFactory { |
|
28 | /** Creates a serializer for the object <code>pObject</code>. |
|
29 | * @param pConfig The request configuration. |
|
30 | * @param pObject The object being serialized. |
|
31 | * @return A serializer for <code>pObject</code>. |
|
32 | * @throws SAXException Creating the serializer failed. |
|
33 | */ |
|
34 | TypeSerializer getSerializer(XmlRpcStreamConfig pConfig, Object pObject) throws SAXException; |
|
35 | ||
36 | /** Creates a parser for a parameter or result object. |
|
37 | * @param pConfig The request configuration. |
|
38 | * @param pContext A namespace context, for looking up prefix mappings. |
|
39 | * @param pURI The namespace URI of the element containing the parameter or result. |
|
40 | * @param pLocalName The local name of the element containing the parameter or result. |
|
41 | * @return The created parser. |
|
42 | */ |
|
43 | TypeParser getParser(XmlRpcStreamConfig pConfig, NamespaceContextImpl pContext, String pURI, String pLocalName); |
|
44 | } |