public interface SocketBinder
Socket based Transports, which are able to bind server
Socket to specific address and listen for incoming data.| Modifier and Type | Method and Description |
|---|---|
Connection<?> |
bind(int port)
Binds Transport to the specific port on localhost.
|
Connection<?> |
bind(SocketAddress socketAddress)
Binds Transport to the specific SocketAddress.
|
Connection<?> |
bind(SocketAddress socketAddress,
int backlog)
Binds Transport to the specific SocketAddress.
|
Connection<?> |
bind(String host,
int port)
Binds Transport to the specific host and port.
|
Connection<?> |
bind(String host,
int port,
int backlog)
Binds Transport to the specific host and port.
|
Connection<?> |
bind(String host,
PortRange portRange,
boolean randomStartPort,
int backlog)
Binds Transport to the specific host, and port within a
PortRange. |
Connection<?> |
bind(String host,
PortRange portRange,
int backlog)
Binds Transport to the specific host, and port within a
PortRange. |
Connection<?> |
bindToInherited()
Binds the Transport to the channel inherited from the entity that created this Java virtual machine.
|
void |
unbind(Connection<?> connection)
Unbinds bound
Transport connection. |
void |
unbindAll()
Unbinds all bound
Transport connections. |
Connection<?> bind(int port) throws IOException
port - the port to bind toConnectionIOException - if unable to bind i.e. if port already boundConnection<?> bind(String host, int port) throws IOException
host - the local host the server will bind toport - specific port to bind toConnectionIOException - if unable to bind i.e. if port already boundConnection<?> bind(String host, int port, int backlog) throws IOException
host - the local host the server will bind toport - the port to bind tobacklog - the maximum length of the queueConnectionIOException - if unable to bind i.e. if port already boundConnection<?> bind(String host, PortRange portRange, int backlog) throws IOException
PortRange.host - the local host the server will bind toportRange - PortRange.backlog - the maximum length of the queueConnectionIOException - if unable to bind i.e. if port already boundConnection<?> bind(String host, PortRange portRange, boolean randomStartPort, int backlog) throws IOException
PortRange.host - the local host the server will bind toportRange - PortRange.randomStartPort - if true, a random port in the range will be used as the initial port.backlog - the maximum length of the queueConnectionIOException - if unable to bind i.e. if port already boundConnection<?> bind(SocketAddress socketAddress) throws IOException
socketAddress - the local address the server will bind toConnectionIOException - if unable to bind i.e. if port already boundConnection<?> bind(SocketAddress socketAddress, int backlog) throws IOException
socketAddress - the local address the server will bind tobacklog - the maximum length of the queueConnectionIOException - if unable to bind i.e. if port already boundConnection<?> bindToInherited() throws IOException
ConnectionIOException - if unable to bind i.e. if port already boundvoid unbind(Connection<?> connection)
Transport connection.connection - Connectionvoid unbindAll()
Transport connections.Copyright © 2017–2020 Oracle Corporation. All rights reserved.