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
12
13 public class TlsSocketFactory implements ISocketFactory {
14
15
16
17
18 public Socket createClientSocket() throws IOException {
19 return SSLSocketFactory.getDefault().createSocket();
20 }
21
22
23
24
25 public ServerSocket createServerSocket() throws IOException {
26 return SSLServerSocketFactory.getDefault().createServerSocket();
27 }
28
29
30 }