Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 package org.apache.xmlrpc.client;
00020
00021 import java.io.IOException;
00022 import java.net.Socket;
00023 import java.net.UnknownHostException;
00024
00025 import javax.net.ssl.SSLSocketFactory;
00026
00027
00031 public class XmlRpcLite14HttpTransport extends XmlRpcLiteHttpTransport {
00032 private SSLSocketFactory sslSocketFactory;
00033
00038 public XmlRpcLite14HttpTransport(XmlRpcClient pClient) {
00039 super(pClient);
00040 }
00041
00045 public SSLSocketFactory getSSLSocketFactory() {
00046 return sslSocketFactory;
00047 }
00048
00052 public void setSSLSocketFactory(SSLSocketFactory pSSLSocketFactory) {
00053 sslSocketFactory = pSSLSocketFactory;
00054 }
00055
00056 protected Socket newSocket(boolean pSSL, String pHostName, int pPort) throws UnknownHostException, IOException {
00057 if (pSSL) {
00058 SSLSocketFactory sslSockFactory = getSSLSocketFactory();
00059 if (sslSockFactory == null) {
00060 sslSockFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
00061 }
00062 return sslSockFactory.createSocket(pHostName, pPort);
00063 } else {
00064 return super.newSocket(pSSL, pHostName, pPort);
00065 }
00066 }
00067 }