Coverage Report - ca.uhn.hl7v2.hoh.sockets.TlsSocketFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
TlsSocketFactory
33%
1/3
N/A
1
 
 1  
 package ca.uhn.hl7v2.hoh.sockets;
 2  
 
 3  
 import java.io.IOException;
 4  
 import java.net.ServerSocket;
 5  
 import java.net.Socket;
 6  
 
 7  
 import javax.net.ssl.SSLServerSocketFactory;
 8  
 import javax.net.ssl.SSLSocketFactory;
 9  
 
 10  
 /**
 11  
  * Socket Factory which creates an encrypted TLS/SSL socket
 12  
  */
 13  5
 public class TlsSocketFactory implements ISocketFactory {
 14  
 
 15  
         /**
 16  
          * {@inheritDoc}
 17  
          */
 18  
         public Socket createClientSocket() throws IOException {
 19  0
                 return SSLSocketFactory.getDefault().createSocket();
 20  
         }
 21  
 
 22  
         /**
 23  
          * {@inheritDoc}
 24  
          */
 25  
         public ServerSocket createServerSocket() throws IOException {
 26  0
                 return SSLServerSocketFactory.getDefault().createServerSocket();
 27  
         }
 28  
 
 29  
 
 30  
 }