XmlRpcSun14HttpTransport.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 java.io.IOException;
00022 import java.net.URL;
00023 import java.net.URLConnection;
00024 import javax.net.ssl.HttpsURLConnection;
00025 import javax.net.ssl.SSLSocketFactory;
00026 
00027 
00033 public class XmlRpcSun14HttpTransport extends XmlRpcSunHttpTransport {
00034     private SSLSocketFactory sslSocketFactory;
00035 
00040     public XmlRpcSun14HttpTransport(XmlRpcClient pClient) {
00041         super(pClient);
00042     }
00043 
00048     public void setSSLSocketFactory(SSLSocketFactory pSocketFactory) {
00049         sslSocketFactory = pSocketFactory;
00050     }
00051 
00055     public SSLSocketFactory getSSLSocketFactory() {
00056         return sslSocketFactory;
00057     }
00058 
00059     protected URLConnection newURLConnection(URL pURL) throws IOException {
00060         final URLConnection conn = super.newURLConnection(pURL);
00061         final SSLSocketFactory sslSockFactory = getSSLSocketFactory();
00062         if ((sslSockFactory != null) && (conn instanceof HttpsURLConnection))
00063             ((HttpsURLConnection)conn).setSSLSocketFactory(sslSockFactory);
00064         return conn;
00065     }
00066 }


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