All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.hl7v2.hoh.sockets.TlsSocketFactory Maven / Gradle / Ivy

There is a newer version: 2.5.1
Show newest version
package ca.uhn.hl7v2.hoh.sockets;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

import javax.net.ssl.SSLServerSocketFactory;
import javax.net.ssl.SSLSocketFactory;

/**
 * Socket Factory which creates an encrypted TLS/SSL socket
 */
public class TlsSocketFactory implements ISocketFactory {

	/**
	 * {@inheritDoc}
	 */
	public Socket createClientSocket() throws IOException {
		return SSLSocketFactory.getDefault().createSocket();
	}

	/**
	 * {@inheritDoc}
	 */
	public ServerSocket createServerSocket() throws IOException {
		return SSLServerSocketFactory.getDefault().createServerSocket();
	}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy