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 boolean |
isReuseAddress |
probes, transport
DEFAULT_CONNECTION_TIMEOUT
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
Connection , binds it to the specific local
and remote remoteAddress . |
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 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
Connection
, binds it to the specific local
and remote remoteAddress
.connect
in interface ConnectorHandler<SocketAddress>
connect
in class AbstractSocketConnectorHandler
remoteAddress
- remote address to connect tolocalAddress
- local address to bind a Connection
tocompletionHandler
- 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 © 2015 Oracle Corporation. All rights reserved.