public class UDPNIOConnectorHandler extends AbstractSocketConnectorHandler
Modifier and Type | Class and Description |
---|---|
static class |
UDPNIOConnectorHandler.Builder |
Modifier and Type | Field and Description |
---|---|
protected long |
connectionTimeoutMillis |
protected static int |
DEFAULT_CONNECTION_TIMEOUT |
protected boolean |
isReuseAddress |
probes, transport
Modifier | Constructor and Description |
---|---|
protected |
UDPNIOConnectorHandler(UDPNIOTransport transport) |
Modifier and Type | Method and Description |
---|---|
static UDPNIOConnectorHandler.Builder |
builder(UDPNIOTransport transport)
Return the
UDPNIOConnectorHandler builder. |
GrizzlyFuture<Connection> |
connect()
Creates non-connected UDP
Connection . |
void |
connect(SocketAddress remoteAddress,
SocketAddress localAddress,
CompletionHandler<Connection> completionHandler)
Creates, initializes socket, binds it to the specific local and remote
SocketAddress and returns Connection , representing socket. |
protected FutureImpl<Connection> |
connectAsync(SocketAddress remoteAddress,
SocketAddress localAddress,
CompletionHandler<Connection> completionHandler,
boolean needFuture) |
protected void |
connectSync(SocketAddress remoteAddress,
SocketAddress localAddress,
CompletionHandler<Connection> completionHandler) |
long |
getSyncConnectTimeout(TimeUnit timeUnit) |
boolean |
isReuseAddress() |
void |
setReuseAddress(boolean isReuseAddress) |
void |
setSyncConnectTimeout(long timeout,
TimeUnit timeUnit) |
protected void |
waitNIOFuture(FutureImpl<Connection> future,
CompletionHandler<Connection> completionHandler) |
addMonitoringProbe, connect, connect, connect, connect, getMonitoringProbes, getProcessor, getProcessorSelector, makeCancellableFuture, preConfigure, removeMonitoringProbe, setProcessor, setProcessorSelector
protected static final int DEFAULT_CONNECTION_TIMEOUT
protected boolean isReuseAddress
protected volatile long connectionTimeoutMillis
protected UDPNIOConnectorHandler(UDPNIOTransport transport)
public GrizzlyFuture<Connection> connect()
Connection
.Connection
.public void connect(SocketAddress remoteAddress, SocketAddress localAddress, CompletionHandler<Connection> completionHandler)
ConnectorHandler
SocketAddress
and returns Connection
, representing socket.connect
in interface ConnectorHandler<SocketAddress>
connect
in class AbstractSocketConnectorHandler
remoteAddress
- remote address to connect to.localAddress
- local address to bind socket to.completionHandler
- CompletionHandler
.protected void connectSync(SocketAddress remoteAddress, SocketAddress localAddress, CompletionHandler<Connection> completionHandler)
protected FutureImpl<Connection> connectAsync(SocketAddress remoteAddress, SocketAddress localAddress, CompletionHandler<Connection> completionHandler, boolean needFuture)
connectAsync
in class AbstractSocketConnectorHandler
public boolean isReuseAddress()
public void setReuseAddress(boolean isReuseAddress)
public long getSyncConnectTimeout(TimeUnit timeUnit)
public void setSyncConnectTimeout(long timeout, TimeUnit timeUnit)
protected void waitNIOFuture(FutureImpl<Connection> future, CompletionHandler<Connection> completionHandler)
public static UDPNIOConnectorHandler.Builder builder(UDPNIOTransport transport)
UDPNIOConnectorHandler
builder.transport
- UDPNIOTransport
.UDPNIOConnectorHandler
builder.Copyright © 2013 Oracle Corporation. All Rights Reserved.