|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindbright.net.SocketFactory
public class SocketFactory
Opens and connects a new SocketChannel with an optional timeout.
Constructor Summary | |
---|---|
SocketFactory()
|
Method Summary | |
---|---|
static java.nio.channels.SocketChannel |
newSocket(java.net.InetAddress ia,
int port)
Connects to the given server. |
static java.nio.channels.SocketChannel |
newSocket(java.net.InetAddress ia,
int port,
long mstimeout)
Connects to the given server. |
static java.nio.channels.SocketChannel |
newSocket(java.lang.String host,
int port)
Connects to the given server. |
static java.nio.channels.SocketChannel |
newSocket(java.lang.String host,
int port,
long mstimeout)
Connects to the given server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SocketFactory()
Method Detail |
---|
public static java.nio.channels.SocketChannel newSocket(java.net.InetAddress ia, int port) throws java.io.IOException
ia
- Address of server to connect toport
- Port to connect to
java.io.IOException
- If there are any errors during the
connection.public static java.nio.channels.SocketChannel newSocket(java.lang.String host, int port) throws java.net.UnknownHostException, java.io.IOException
host
- Name of server to connect toport
- Port to connect to
java.io.IOException
- If there are any errors during the
connection.
java.net.UnknownHostException
public static java.nio.channels.SocketChannel newSocket(java.lang.String host, int port, long mstimeout) throws java.net.UnknownHostException, java.io.IOException
host
- Name of server to connect toport
- Port to connect tomstimeout
- How many millisecondse to wait before giving up
java.io.IOException
- If there are any errors during the
connection or if the connection has not
been established before mstimeout
milliseconds have passwd.
java.net.UnknownHostException
public static java.nio.channels.SocketChannel newSocket(java.net.InetAddress ia, int port, long mstimeout) throws java.io.IOException
ia
- Address of server to connect toport
- Port to connect tomstimeout
- How many millisecondse to wait before giving up
java.io.IOException
- If there are any errors during the
connection or if the connection has not
been established before mstimeout
milliseconds have passwd.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |