|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A factory for creating Sockets.
Both Object.equals()
and
Object.hashCode()
should be overridden appropriately.
Protocol socket factories are used to uniquely identify Protocol
s and
HostConfiguration
s, and equals()
and hashCode()
are
required for the correct operation of some connection managers.
Protocol
Method Summary | |
---|---|
java.net.Socket |
createSocket(java.lang.String host,
int port)
Gets a new socket connection to the given host. |
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress clientHost,
int clientPort)
Gets a new socket connection to the given host. |
Method Detail |
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress clientHost, int clientPort) throws java.io.IOException, java.net.UnknownHostException
host
- the host name/IPport
- the port on the hostclientHost
- the local host name/IP to bind the socket toclientPort
- the port on the local machine
java.io.IOException
- if an I/O error occurs while creating the socket
java.net.UnknownHostException
- if the IP address of the host cannot be
determinedpublic java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException, java.net.UnknownHostException
host
- the host name/IPport
- the port on the host
java.io.IOException
- if an I/O error occurs while creating the socket
java.net.UnknownHostException
- if the IP address of the host cannot be
determined
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |