XmlRpcClientDefaults.java
Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one
00003  * or more contributor license agreements.  See the NOTICE file
00004  * distributed with this work for additional information
00005  * regarding copyright ownership.  The ASF licenses this file
00006  * to you under the Apache License, Version 2.0 (the
00007  * "License"); you may not use this file except in compliance
00008  * with the License.  You may obtain a copy of the License at
00009  *
00010  *   http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing,
00013  * software distributed under the License is distributed on an
00014  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00015  * KIND, either express or implied.  See the License for the
00016  * specific language governing permissions and limitations
00017  * under the License.    
00018  */
00019 package org.apache.xmlrpc.client;
00020 
00021 import org.apache.xmlrpc.serializer.DefaultXMLWriterFactory;
00022 import org.apache.xmlrpc.serializer.XmlWriterFactory;
00023 
00024 
00028 public class XmlRpcClientDefaults {
00029     private static final XmlWriterFactory xmlWriterFactory = new DefaultXMLWriterFactory();
00030 
00034     public static XmlRpcTransportFactory newTransportFactory(XmlRpcClient pClient) {
00035         try {
00036             return new XmlRpcSun15HttpTransportFactory(pClient);
00037         } catch (Throwable t1) {
00038             try {
00039                 return new XmlRpcSun14HttpTransportFactory(pClient);
00040             } catch (Throwable t2) {
00041                 return new XmlRpcSunHttpTransportFactory(pClient);
00042             }
00043         }
00044     }
00045 
00049     public static XmlRpcClientConfig newXmlRpcClientConfig() {
00050         return new XmlRpcClientConfigImpl();
00051     }
00052     
00056     public static XmlWriterFactory newXmlWriterFactory() {
00057         return xmlWriterFactory;
00058     }
00059 }


rosjava_core
Author(s):
autogenerated on Wed Aug 26 2015 16:06:49