Framework Professional Edition Package


com.prosyst.util.net
Class PlainSocketFactory

java.lang.Object
  extended by com.prosyst.util.net.PlainSocketFactory
All Implemented Interfaces:
ServerSocketFactory, SocketFactory

public class PlainSocketFactory
extends java.lang.Object
implements ServerSocketFactory, SocketFactory


Constructor Summary
PlainSocketFactory()
           
 
Method Summary
 java.net.Socket openProxySocket(java.net.InetAddress address, int port, java.net.InetAddress proxy, int pport)
          Connects a socket through a proxy to address and port.
 java.net.Socket openProxySocket(java.net.InetAddress address, int port, java.net.InetAddress proxy, int pport, java.util.Dictionary dict)
          Connects a socket through a proxy to address and port.
 java.net.Socket openProxySocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort, java.net.InetAddress proxy, int pport)
          Connects a socket through a proxy from localAddr and localPort ( multi IP machines)
 java.net.Socket openProxySocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort, java.net.InetAddress proxy, int pport, java.util.Dictionary dict)
          Connects a socket through a proxy from localAddr and localPort ( multi IP machines)
 java.net.Socket openProxySocket(java.lang.String host, int port, java.net.InetAddress proxy, int pport)
          Connects a socket using a proxy, specified by proxy and pport to the host, defined by host and port.
 java.net.Socket openProxySocket(java.lang.String host, int port, java.net.InetAddress proxy, int pport, java.util.Dictionary dict)
           
 java.net.Socket openProxySocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort, java.net.InetAddress proxy, int pport)
          Connects a socket using a proxy from the local address (localAddr, localPort) to the remote address (host, port).
 java.net.Socket openProxySocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort, java.net.InetAddress proxy, int pport, java.util.Dictionary dict)
           
 java.net.ServerSocket openServerSocket(int port)
          Returns a ServerSocket bound to the specified port.
 java.net.ServerSocket openServerSocket(int port, java.util.Dictionary dict)
          Returns a ServerSocket bound to the specified port.
 java.net.ServerSocket openServerSocket(int port, int backlog)
          Returns a ServerSocket bound to the specified port with maximum number of waiting connections backlog.
 java.net.ServerSocket openServerSocket(int port, int backlog, java.util.Dictionary dict)
          Returns a ServerSocket binded to the specified port with maximum number of waiting to be accepted connections backlog.
 java.net.ServerSocket openServerSocket(int port, int backlog, java.net.InetAddress bindAddress)
          Returns a ServerSocket bound to the specified port and bindAddress ( for multi IP machines )with maximum number of connections backlog
 java.net.ServerSocket openServerSocket(int port, int backlog, java.net.InetAddress bindAddress, java.util.Dictionary dict)
          Returns a ServerSocket bound to the specified port and bindAddress ( for multi IP machines ) with maximum number of connections backlog.
 java.net.Socket openSocket(java.net.InetAddress address, int port)
          Opens a Socket and binds it to the remote address and port.
 java.net.Socket openSocket(java.net.InetAddress address, int port, java.util.Dictionary dict)
          Opens a Socket and binds it to the remote address and port.
 java.net.Socket openSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort)
          Opens a Socket and binds it to the remote address and port from localAddr and localPort ( multi IP machines).
 java.net.Socket openSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort, java.util.Dictionary dict)
          Opens a Socket and binds it to address and port from localAddr and localPort ( multi IP machines).
 java.net.Socket openSocket(java.lang.String host, int port)
          Same as openSocket( InetAddress address, int port) but performs InetAddress.getByName(host) to obtain the address.
 java.net.Socket openSocket(java.lang.String host, int port, java.util.Dictionary dict)
          Same as openSocket( InetAddress address, int port) but performs InetAddress.getByName(host) to obtain the address.
 java.net.Socket openSocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort)
          Same as openSocket(InetAddress address, int port, InetAddress localAddr, int localPort) but performs InetAddress.getByName(host) to obtain the address.
 java.net.Socket openSocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort, java.util.Dictionary dict)
          Same as openSocket(InetAddress address, int port, InetAddress localAddr, int localPort) but performs InetAddress.getByName(host) to obtain the address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainSocketFactory

public PlainSocketFactory()
Method Detail

openSocket

public java.net.Socket openSocket(java.net.InetAddress address,
                                  int port)
                           throws java.io.IOException
Description copied from interface: SocketFactory
Opens a Socket and binds it to the remote address and port.

Specified by:
openSocket in interface SocketFactory
Parameters:
address - remote address to bind the socket to
port - remote port to bind the socket to
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openSocket

public java.net.Socket openSocket(java.net.InetAddress address,
                                  int port,
                                  java.util.Dictionary dict)
                           throws java.io.IOException
Description copied from interface: SocketFactory
Opens a Socket and binds it to the remote address and port.

Specified by:
openSocket in interface SocketFactory
Parameters:
address - remote address to bind the socket to
port - remote port to bind the socket to
dict - socket properties. Sockets can be customized via these properties. See SocketFactory implementation documentation for details on how to use these props.
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openSocket

public java.net.Socket openSocket(java.net.InetAddress address,
                                  int port,
                                  java.net.InetAddress localAddr,
                                  int localPort)
                           throws java.io.IOException
Description copied from interface: SocketFactory
Opens a Socket and binds it to the remote address and port from localAddr and localPort ( multi IP machines).

Specified by:
openSocket in interface SocketFactory
Parameters:
address - remote address to bind the socket to
port - remote port to bind the socket to
localAddr - local address to bind the socket from
localPort - local port to bind the socket from
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openSocket

public java.net.Socket openSocket(java.net.InetAddress address,
                                  int port,
                                  java.net.InetAddress localAddr,
                                  int localPort,
                                  java.util.Dictionary dict)
                           throws java.io.IOException
Description copied from interface: SocketFactory
Opens a Socket and binds it to address and port from localAddr and localPort ( multi IP machines).

Specified by:
openSocket in interface SocketFactory
Parameters:
address - remote address to bind the socket to
port - remote port to bind the socket to
localAddr - local address to bind the socket from
localPort - local port to bind the socket from
dict - socket properties. Sockets can be customized via these properties. See SocketFactory implementation documentation for details on how to use these props.
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openSocket

public java.net.Socket openSocket(java.lang.String host,
                                  int port)
                           throws java.io.IOException
Description copied from interface: SocketFactory
Same as openSocket( InetAddress address, int port) but performs InetAddress.getByName(host) to obtain the address.

Specified by:
openSocket in interface SocketFactory
port - remote port to bind the socket to
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openSocket

public java.net.Socket openSocket(java.lang.String host,
                                  int port,
                                  java.util.Dictionary dict)
                           throws java.io.IOException
Description copied from interface: SocketFactory
Same as openSocket( InetAddress address, int port) but performs InetAddress.getByName(host) to obtain the address.

Specified by:
openSocket in interface SocketFactory
port - remote port to bind the socket to
dict - socket properties. Sockets can be customized via these properties. See SocketFactory implementation documentation for details on how to use these props.
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openSocket

public java.net.Socket openSocket(java.lang.String host,
                                  int port,
                                  java.net.InetAddress localAddr,
                                  int localPort)
                           throws java.io.IOException
Description copied from interface: SocketFactory
Same as openSocket(InetAddress address, int port, InetAddress localAddr, int localPort) but performs InetAddress.getByName(host) to obtain the address.

Specified by:
openSocket in interface SocketFactory
port - remote port to bind the socket to
localAddr - local address to bind the socket from
localPort - local port to bind the socket from
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openSocket

public java.net.Socket openSocket(java.lang.String host,
                                  int port,
                                  java.net.InetAddress localAddr,
                                  int localPort,
                                  java.util.Dictionary dict)
                           throws java.io.IOException
Description copied from interface: SocketFactory
Same as openSocket(InetAddress address, int port, InetAddress localAddr, int localPort) but performs InetAddress.getByName(host) to obtain the address.

Specified by:
openSocket in interface SocketFactory
port - remote port to bind the socket to
localAddr - local address to bind the socket from
localPort - local port to bind the socket from
dict - socket properties. Sockets can be customized via these properties. See SocketFactory implementation documentation for details on how to use these props.
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openServerSocket

public java.net.ServerSocket openServerSocket(int port)
                                       throws java.io.IOException
Description copied from interface: ServerSocketFactory
Returns a ServerSocket bound to the specified port.

Specified by:
openServerSocket in interface ServerSocketFactory
Parameters:
port - port to bind the ServerSocket to.
Returns:
a ServerSocket bound to the port
Throws:
java.io.IOException - if ServerSocket can not be opened. A reason may be that port is busy.

openServerSocket

public java.net.ServerSocket openServerSocket(int port,
                                              java.util.Dictionary dict)
                                       throws java.io.IOException
Description copied from interface: ServerSocketFactory
Returns a ServerSocket bound to the specified port.

Specified by:
openServerSocket in interface ServerSocketFactory
Parameters:
port - port to bind the ServerSocket to.
dict - socket properties. ServerSockets can be customized via these properties. See ServerSocketFactory implementation documentation for details on how to use these properties.
Returns:
a ServerSocket bound to the port
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openServerSocket

public java.net.ServerSocket openServerSocket(int port,
                                              int backlog)
                                       throws java.io.IOException
Description copied from interface: ServerSocketFactory
Returns a ServerSocket bound to the specified port with maximum number of waiting connections backlog.

Specified by:
openServerSocket in interface ServerSocketFactory
Parameters:
port - port to bind the ServerSocket to.
backlog - the maximum length of the queue.
Returns:
a ServerSocket bound to the port
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openServerSocket

public java.net.ServerSocket openServerSocket(int port,
                                              int backlog,
                                              java.util.Dictionary dict)
                                       throws java.io.IOException
Description copied from interface: ServerSocketFactory
Returns a ServerSocket binded to the specified port with maximum number of waiting to be accepted connections backlog.

Specified by:
openServerSocket in interface ServerSocketFactory
Parameters:
port - port to bind the ServerSocket to.
backlog - the maximum length of the queue.
dict - socket properties. ServerSockets can be customized via these properties. See ServerSocketFactory implementation documentation for details on how to use these properties.
Returns:
a ServerSocket bound to the port
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openServerSocket

public java.net.ServerSocket openServerSocket(int port,
                                              int backlog,
                                              java.net.InetAddress bindAddress)
                                       throws java.io.IOException
Description copied from interface: ServerSocketFactory
Returns a ServerSocket bound to the specified port and bindAddress ( for multi IP machines )with maximum number of connections backlog

Specified by:
openServerSocket in interface ServerSocketFactory
Parameters:
port - port to bind the ServerSocket to.
backlog - the maximum length of the queue.
Returns:
a ServerSocket bound to the port and address
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openServerSocket

public java.net.ServerSocket openServerSocket(int port,
                                              int backlog,
                                              java.net.InetAddress bindAddress,
                                              java.util.Dictionary dict)
                                       throws java.io.IOException
Description copied from interface: ServerSocketFactory
Returns a ServerSocket bound to the specified port and bindAddress ( for multi IP machines ) with maximum number of connections backlog.

Specified by:
openServerSocket in interface ServerSocketFactory
Parameters:
port - port to bind the ServerSocket to.
backlog - the maximum length of the queue.
dict - socket properties. ServerSockets can be customized via these properties. See ServerSocketFactory implementation documentation for details on how to use these properties.
Returns:
a ServerSocket bound to the port and bind address.
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openProxySocket

public java.net.Socket openProxySocket(java.net.InetAddress address,
                                       int port,
                                       java.net.InetAddress proxy,
                                       int pport)
                                throws java.io.IOException
Description copied from interface: SocketFactory
Connects a socket through a proxy to address and port.

Specified by:
openProxySocket in interface SocketFactory
Parameters:
address - remote address to bind the socket to
port - remote port to bind the socket to
proxy - the address of the proxy
pport - the port of the proxy
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openProxySocket

public java.net.Socket openProxySocket(java.net.InetAddress address,
                                       int port,
                                       java.net.InetAddress proxy,
                                       int pport,
                                       java.util.Dictionary dict)
                                throws java.io.IOException
Description copied from interface: SocketFactory
Connects a socket through a proxy to address and port.

Specified by:
openProxySocket in interface SocketFactory
Parameters:
address - remote address to bind the socket to
port - remote port to bind the socket to
proxy - the address of the proxy
pport - the port of the proxy
dict - socket properties. Sockets can be customized via these properties. See SocketFactory implementation documentation for details on how to use these props.
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openProxySocket

public java.net.Socket openProxySocket(java.net.InetAddress address,
                                       int port,
                                       java.net.InetAddress localAddr,
                                       int localPort,
                                       java.net.InetAddress proxy,
                                       int pport)
                                throws java.io.IOException
Description copied from interface: SocketFactory
Connects a socket through a proxy from localAddr and localPort ( multi IP machines)

Specified by:
openProxySocket in interface SocketFactory
Parameters:
address - remote address to bind the socket to
port - remote port to bind the socket to
localAddr - local address to bind the socket from
localPort - local port to bind the socket from
proxy - the address of the proxy
pport - the port of the proxy
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openProxySocket

public java.net.Socket openProxySocket(java.net.InetAddress address,
                                       int port,
                                       java.net.InetAddress localAddr,
                                       int localPort,
                                       java.net.InetAddress proxy,
                                       int pport,
                                       java.util.Dictionary dict)
                                throws java.io.IOException
Description copied from interface: SocketFactory
Connects a socket through a proxy from localAddr and localPort ( multi IP machines)

Specified by:
openProxySocket in interface SocketFactory
Parameters:
address - remote address to bind the socket to
port - remote port to bind the socket to
localAddr - local address to bind the socket from
localPort - local port to bind the socket from
proxy - the address of the proxy
pport - the port of the proxy
dict - socket properties. Sockets can be customized via these properties. See SocketFactory implementation documentation for details on how to use these props.
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openProxySocket

public java.net.Socket openProxySocket(java.lang.String host,
                                       int port,
                                       java.net.InetAddress proxy,
                                       int pport)
                                throws java.io.IOException
Description copied from interface: SocketFactory
Connects a socket using a proxy, specified by proxy and pport to the host, defined by host and port.

Specified by:
openProxySocket in interface SocketFactory
Parameters:
host - remote host to bind the socket to
port - remote port to bind the socket to
proxy - the address of the proxy
pport - the port of the proxy
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openProxySocket

public java.net.Socket openProxySocket(java.lang.String host,
                                       int port,
                                       java.net.InetAddress proxy,
                                       int pport,
                                       java.util.Dictionary dict)
                                throws java.io.IOException
Specified by:
openProxySocket in interface SocketFactory
Parameters:
host - remote host to bind the socket to
port - remote port to bind the socket to
proxy - the address of the proxy
pport - the port of the proxy
dict - socket properties. Sockets can be customized via these properties. See SocketFactory implementation documentation for details on how to use these props.
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.
See Also:
SocketFactory.openProxySocket(String host, int port, InetAddress proxy, int pport)

openProxySocket

public java.net.Socket openProxySocket(java.lang.String host,
                                       int port,
                                       java.net.InetAddress localAddr,
                                       int localPort,
                                       java.net.InetAddress proxy,
                                       int pport)
                                throws java.io.IOException
Description copied from interface: SocketFactory
Connects a socket using a proxy from the local address (localAddr, localPort) to the remote address (host, port).

Specified by:
openProxySocket in interface SocketFactory
Parameters:
host - remote host to bind the socket to
port - remote port to bind the socket to
localAddr - local address to bind the socket from
localPort - local port to bind the socket from
proxy - the address of the proxy
pport - the port of the proxy
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.

openProxySocket

public java.net.Socket openProxySocket(java.lang.String host,
                                       int port,
                                       java.net.InetAddress localAddr,
                                       int localPort,
                                       java.net.InetAddress proxy,
                                       int pport,
                                       java.util.Dictionary dict)
                                throws java.io.IOException
Specified by:
openProxySocket in interface SocketFactory
Parameters:
host - remote host to bind the socket to
port - remote port to bind the socket to
localAddr - local address to bind the socket from
localPort - local port to bind the socket from
proxy - the address of the proxy
pport - the port of the proxy
dict - socket properties. Sockets can be customized via these properties. See SocketFactory implementation documentation for details on how to use these props.
Returns:
a Socket bound to the specified address and port
Throws:
java.io.IOException - If an I/O error occurs.
See Also:
SocketFactory.openProxySocket(String host, int port, InetAddress localAddr, int localPort, InetAddress proxy, int pport)

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved