public JrdsSocketConnection(String host, int port, SocketFactory sf) throws IOException { super(sf.createSocket(host, port)); this.host = host; this.port = port; }
@Override public Socket createSocket(HttpContext context) throws IOException { return ss.createSocket(); } };
@Override public boolean startConnection() { SocketFactory ss = getLevel().find(SocketFactory.class); channel = new SocketChannels(); try { channel.muninsSocket = ss.createSocket(getHostName(), port); channel.out = new PrintWriter(channel.muninsSocket.getOutputStream(), true); channel.in = new BufferedReader(new InputStreamReader(channel.muninsSocket.getInputStream())); } catch (IOException e) { log(Level.ERROR, e, "Connection error", e.getMessage()); return false; } return true; }
Socket makeSocket(String host, int port) throws IOException { SocketFactory sf = getLevel().find(SocketFactory.class); return sf.createSocket(host, port); }
public Socket connect(String host, int port) throws NoSuchAlgorithmException, KeyManagementException, IOException { SocketFactory ss = getLevel().find(SocketFactory.class); Socket s = ss.createSocket(host, port); SSLSocketFactory ssf = getContext().getSocketFactory(); s = ssf.createSocket(s, host, port, true); log(Level.DEBUG, "done SSL handshake for %s", host); return s; }
private Socket connect() throws NoSuchAlgorithmException, KeyManagementException, IOException { if(port == 23) { SocketFactory ss = find(SocketFactory.class); return ss.createSocket(iloHost, port); } else { return find(SSLStarter.class).connect(iloHost, port); } }
public Socket createSocket(String host, int port) throws IOException { log(Level.DEBUG, "creating a RMI socket to %s:%d", host, port); return getLevel().find(SocketFactory.class).createSocket(host, port); } }
public Socket createSocket(String host, int port) throws IOException { log(Level.DEBUG, "creating a RMI socket to %s:%d", host, port); return getLevel().find(SocketFactory.class).createSocket(host, port); }
if(!ss.isStarted()) return null; s = ss.createSocket(this, port); } catch (Exception e) { log(Level.ERROR, e, "Connect error %s", e);