Coverage Report - ca.uhn.hl7v2.util.StandardSocketFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
StandardSocketFactory
54%
6/11
N/A
1
 
 1  
 package ca.uhn.hl7v2.util;
 2  
 
 3  
 import java.io.IOException;
 4  
 import java.net.ServerSocket;
 5  
 import java.net.Socket;
 6  
 
 7  473
 public class StandardSocketFactory implements SocketFactory {
 8  
 
 9  
         /**
 10  
          * {@inheritDoc}
 11  
          */
 12  
         public Socket createSocket() throws IOException {
 13  63
                 Socket retVal = javax.net.SocketFactory.getDefault().createSocket();
 14  63
                 retVal.setKeepAlive(true);
 15  63
                 retVal.setTcpNoDelay(true);
 16  63
                 return retVal;
 17  
         }
 18  
 
 19  
         /**
 20  
          * {@inheritDoc} 
 21  
          */
 22  
         public Socket createTlsSocket() throws IOException {
 23  0
                 Socket retVal = javax.net.ssl.SSLSocketFactory.getDefault().createSocket();
 24  0
                 retVal.setKeepAlive(true);
 25  0
         retVal.setTcpNoDelay(true);
 26  0
                 return retVal;
 27  
         }
 28  
 
 29  
         /**
 30  
          * {@inheritDoc}
 31  
          */
 32  
         public ServerSocket createServerSocket() throws IOException {
 33  21
                 return javax.net.ServerSocketFactory.getDefault().createServerSocket();
 34  
         }
 35  
 
 36  
         /**
 37  
          * {@inheritDoc}
 38  
          */
 39  
         public ServerSocket createTlsServerSocket() throws IOException {
 40  0
                 return javax.net.ssl.SSLServerSocketFactory.getDefault().createServerSocket();
 41  
         }
 42  
 
 43  
 }