org.apache.mina.transport.nio

## Class NioUdpClient

- java.lang.Object
- - org.apache.mina.service.AbstractIoService
  - - org.apache.mina.service.client.AbstractIoClient
    - - org.apache.mina.transport.udp.AbstractUdpClient
      - - org.apache.mina.transport.nio.NioUdpClient

All Implemented Interfaces:
  IoClient, IoService

    public class NioUdpClient
    extends AbstractUdpClient

This class implements a UDP NIO based client.

Author:
  Apache MINA Project

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.mina.service.AbstractIoService

`AbstractIoService.ServiceState`

### Field Summary

### Fields inherited from class org.apache.mina.service.AbstractIoService

`config, ioHandlerExecutor`

### Constructor Summary

Constructors
Constructor and Description
`NioUdpClient()` Create a new instance of NioUdpClient
`NioUdpClient(IoHandlerExecutor ioHandlerExecutor)` Create a new instance of NioUdpClient

### Method Summary

Methods
`IoFuture<IoSession>` `connect(SocketAddress remoteAddress)` Connects to the specified remote address.
`IoFuture<IoSession>` `connect(SocketAddress remoteAddress, SocketAddress localAddress)` Connects to the specified remote address binding to the specified local address.

### Methods inherited from class org.apache.mina.transport.udp.AbstractUdpClient

`getSessionConfig`

### Methods inherited from class org.apache.mina.service.AbstractIoService

`fireServiceActivated, fireServiceInactivated, getFilters, getIoHandler, getIoHandlerExecutor, getManagedSessions, initState, isActive, isCreated, isDisposed, isDisposing, isSuspended, setActive, setCreated, setDisposed, setDisposing, setFilters, setIoHandler, setSuspended`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### NioUdpClient

    public NioUdpClient()

Create a new instance of NioUdpClient

#### NioUdpClient

    public NioUdpClient(IoHandlerExecutor ioHandlerExecutor)

Create a new instance of NioUdpClient

### Method Detail

#### connect

    public IoFuture<IoSession> connect(SocketAddress remoteAddress)

Connects to the specified remote address.

Parameters:
  `remoteAddress` - Remote `SocketAddress` to connect
Returns:
  the `IoFuture` instance which is completed when the connection attempt initiated by this call succeeds or fails.

#### connect

    public IoFuture<IoSession> connect(SocketAddress remoteAddress,
                              SocketAddress localAddress)

Connects to the specified remote address binding to the specified local address.

Specified by:
  `connect` in class `AbstractUdpClient`
Parameters:
  `remoteAddress` - Remote `SocketAddress` to connect
  `localAddress` - Local `SocketAddress` to use while initiating connection to remote `SocketAddress`
Returns:
  the `IoFuture` instance which is completed when the connection attempt initiated by this call succeeds or fails.