KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > om > OMAbstractFactory


1 package org.apache.axis2.om;
2
3 import org.apache.axis2.soap.SOAPFactory;
4 import org.apache.axis2.soap.impl.llom.factory.SOAPLinkedListImplFactory;
5
6 /**
7  * Copyright 2001-2004 The Apache Software Foundation.
8  * <p/>
9  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
10  * use this file except in compliance with the License. You may obtain a copy of
11  * the License at
12  * <p/>
13  * http://www.apache.org/licenses/LICENSE-2.0
14  * <p/>
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18  * License for the specific language governing permissions and limitations under
19  * the License.
20  * <p/>
21  */

22 public class OMAbstractFactory {
23     /**
24      * Eran Chinthaka (chinthaka@apache.org)
25      */

26     /**
27      * Constructor OMFactory
28      */

29     protected OMAbstractFactory() {
30     }
31
32     /**
33      * This will pick up the default factory implementation from the classpath
34      *
35      * @return
36      */

37     public static OMFactory getOMFactory() {
38         return FactoryFinder.findOMFactory(null);
39     }
40
41     /**
42      * If user needs to provide his own factory implementation, here provide the
43      * Class Loader for that.
44      * @param classLoader
45      * @return
46      */

47     public static OMFactory getOMFactory(ClassLoader JavaDoc classLoader) {
48         return FactoryFinder.findOMFactory(classLoader);
49     }
50
51     /**
52      * This will pick up the default factory implementation from the classpath
53      *
54      * @return
55      */

56     public static SOAPFactory getSOAP11Factory() {
57         return FactoryFinder.findSOAP11Factory(null);
58     }
59
60     /**
61      * If user needs to provide his own factory implementation, here provide the
62      * Class Loader for that.
63      * @param classLoader
64      * @return
65      */

66     public static SOAPFactory getSOAP11Factory(ClassLoader JavaDoc classLoader) {
67         return FactoryFinder.findSOAP11Factory(classLoader);
68     }
69
70     /**
71      * This will pick up the default factory implementation from the classpath
72      *
73      * @return
74      */

75     public static SOAPFactory getSOAP12Factory() {
76         return FactoryFinder.findSOAP12Factory(null);
77     }
78
79     /**
80      * If user needs to provide his own factory implementation, here provide the
81      * Class Loader for that.
82      * @param classLoader
83      * @return
84      */

85     public static SOAPFactory getSOAP12Factory(ClassLoader JavaDoc classLoader) {
86         return FactoryFinder.findSOAP12Factory(classLoader);
87     }
88
89     public static SOAPFactory getDefaultSOAPFactory() {
90         return new SOAPLinkedListImplFactory();
91     }
92 }
93
Popular Tags