Package org.tn5250j.framework.transport
Class SocketConnector
- java.lang.Object
-
- org.tn5250j.framework.transport.SocketConnector
-
public class SocketConnector extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SocketConnector()Creates a new instance that creates a plain socket by default.
-
Method Summary
Modifier and Type Method Description java.net.SocketcreateSocket(java.lang.String destination, int port)Create a new client Socket to the given destination and port.voidsetSSLType(java.lang.String type)Set the type of SSL connection to use.
-
-
-
Method Detail
-
setSSLType
public void setSSLType(java.lang.String type)
Set the type of SSL connection to use. Specify null or an empty string to use a plain socket.- Parameters:
type- The SSL connection type
-
createSocket
public java.net.Socket createSocket(java.lang.String destination, int port)Create a new client Socket to the given destination and port. If an SSL socket type has not been specified (by setSSLType(String)), then a plain socket will be created. Otherwise, a new SSL socket of the specified type will be created.- Parameters:
destination- destination hostport- a port to connect to- Returns:
- a new client socket, or null if
-
-