public class SocketFactoryImpl
extends javax.net.SocketFactory
1. SO_KEEPALIVE - is keepalive enabled? 2. OOBINLINE - is out of band in-line enabled? 3. SO_REUSEADDR - should the address be reused? 4. TCP_NODELAY - should data buffering for tcp be used? 5. SO_RCVBUF - size of receive buffer 6. SO_SNDBUF - size of send buffer 7. SO_TIMEOUT - read timeout (millisecs) 8. SO_CONNECT_TIMEOUT - connect timeout (millisecs) 9. SO_LINGER - is lingering enabled? 10. LINGER - amount of time to linger (seconds)
Modifier and Type | Field and Description |
---|---|
static int |
LINGER
amount of time to linger
|
static boolean |
OOBINLINE
is out of band in-line enabled
|
static int |
SO_CONNECT_TIMEOUT
connect timeout in milliseconds
|
static boolean |
SO_KEEPALIVE
should keep alives be sent
|
static boolean |
SO_LINGER
enabling lingering with 0-timeout will cause the socket to be
closed forcefully upon execution of close()
|
static int |
SO_RCVBUF
size of receiving buffer
|
static boolean |
SO_REUSEADDR
should the address be reused
|
static int |
SO_SNDBUF
size of sending buffer iff needed
|
static int |
SO_TIMEOUT
read timeout in milliseconds
|
static boolean |
TCP_NODELAY
do not buffer send(s) iff true
|
Constructor and Description |
---|
SocketFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
protected java.net.Socket |
applySettings(java.net.Socket s)
Applies the current settings to the given socket.
|
java.net.Socket |
createSocket() |
java.net.Socket |
createSocket(java.net.InetAddress host,
int port) |
java.net.Socket |
createSocket(java.net.InetAddress host,
int port,
java.net.InetAddress local,
int localPort) |
java.net.Socket |
createSocket(java.lang.String host,
int port) |
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress local,
int localPort) |
static javax.net.SocketFactory |
getDefault() |
public static final boolean SO_KEEPALIVE
public static final boolean OOBINLINE
public static final boolean SO_REUSEADDR
public static final boolean TCP_NODELAY
public static final int SO_RCVBUF
public static final int SO_SNDBUF
public static final int SO_TIMEOUT
public static final int SO_CONNECT_TIMEOUT
public static final boolean SO_LINGER
public static final int LINGER
public java.net.Socket createSocket() throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
protected java.net.Socket applySettings(java.net.Socket s)
s
- Socket to apply the settings topublic java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress local, int localPort) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public java.net.Socket createSocket(java.net.InetAddress host, int port, java.net.InetAddress local, int localPort) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public static javax.net.SocketFactory getDefault()
SocketFactory.getDefault()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.