/** * Create a client socket connected to the specified host and port. * <p> * If necessary this implementation can be changed to specify the outbound address to use * e.g. <code>Socket socket = new Socket(host, port, localInterface , 0);</code> * * @param host the host name * @param port the port number * @return a socket connected to the specified host and port. * @throws java.io.IOException if an I/O error occurs during socket creation * @since 1.2 */ public Socket createSocket(String host, int port) throws IOException { Socket socket = getConfiguredRMISocketFactory().createSocket(host, port); socket.setSoTimeout(socketTimeoutMillis); return socket; }
public Socket createSocket(String host, int port) throws IOException { Socket s = RMISocketFactory.getDefaultSocketFactory(). createSocket(this.host, this.port); return s; } public boolean equals(Object o) {
@Override public Socket createSocket(final String host, final int port) throws IOException { return RMISocketFactory.getDefaultSocketFactory().createSocket(host, port); }
@Override public Socket createSocket(final String host, final int port) throws IOException { return RMISocketFactory.getDefaultSocketFactory().createSocket(host, port); }
/** * Create a client socket connected to the specified host and port. * <p/> * If necessary this implementation can be changed to specify the outbound address to use * e.g. <code>Socket socket = new Socket(host, port, localInterface , 0);</code> * * @param host the host name * @param port the port number * @return a socket connected to the specified host and port. * @throws java.io.IOException if an I/O error occurs during socket creation * @since 1.2 */ public Socket createSocket(String host, int port) throws IOException { Socket socket = getConfiguredRMISocketFactory().createSocket(host, port); socket.setSoTimeout(socketTimeoutMillis); return socket; }
/** * Create a client socket connected to the specified host and port. * <p> * If necessary this implementation can be changed to specify the outbound address to use * e.g. <code>Socket socket = new Socket(host, port, localInterface , 0);</code> * * @param host the host name * @param port the port number * @return a socket connected to the specified host and port. * @throws java.io.IOException if an I/O error occurs during socket creation * @since 1.2 */ public Socket createSocket(String host, int port) throws IOException { Socket socket = getConfiguredRMISocketFactory().createSocket(host, port); socket.setSoTimeout(socketTimeoutMillis); return socket; }
/** * Create a client socket connected to the specified host and port. * <p/> * If necessary this implementation can be changed to specify the outbound address to use * e.g. <code>Socket socket = new Socket(host, port, localInterface , 0);</code> * * @param host the host name * @param port the port number * @return a socket connected to the specified host and port. * @throws java.io.IOException if an I/O error occurs during socket creation * @since 1.2 */ public Socket createSocket(String host, int port) throws IOException { Socket socket = getConfiguredRMISocketFactory().createSocket(host, port); socket.setSoTimeout(socketTimeoutMillis); return socket; }
public Socket createSocket(String host, int port) throws IOException { Socket s = null; String socketHost = hostname; /* * If the factory is not configured for any specific host, use whatever * is passed in to createSocket. * * The wildcard "*" here is something that could be set on the server * side. It is the constant jmsserver.Globals.HOSTNAME_ALL but we don't * want to introduce any server side compile time dependencies here. * Remember that this factory is created by the server. */ if ((socketHost == null) || (socketHost.equals("*"))) { socketHost = host; } try { if (useSSL) { s = (Socket)makeSSLSocket(socketHost, port); } else { s = RMISocketFactory.getDefaultSocketFactory(). createSocket(socketHost, port); } } catch (Exception e) { throw new IOException(e.toString()); } return (s); }
public Socket createSocket(String host, int port) throws IOException { System.out.println("change host from " + host + " to " + server); return getFactory().createSocket(server, port);
@Test(expected = NetworkReactiveAuditException.class) public void createSocket() throws Exception { TestTools.strict.commit(); RMISocketFactory factory = getRmiSocketFactory(); factory.createSocket("", 1); }