org.apache.mina.transport.bio

## Class BioUdpServer

- java.lang.Object
- - org.apache.mina.service.AbstractIoService
  - - org.apache.mina.service.server.AbstractIoServer
    - - org.apache.mina.transport.udp.AbstractUdpServer
      - - org.apache.mina.transport.bio.BioUdpServer

All Implemented Interfaces:
  IoClient, IoServer, IoService

    public class BioUdpServer
    extends AbstractUdpServer

A java blocking I/O based UDP server.

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
`BioUdpServer()` Create an UDP server
`BioUdpServer(IoHandlerExecutor executor)`
`BioUdpServer(UdpSessionConfig config, IoHandlerExecutor executor)`

### Method Summary

Methods
`void` `bind(int port)` Binds the server to the specified port.
`void` `bind(SocketAddress localAddress)` Binds to the specified local addresses and start to accept incoming connections.
`IoFuture<IoSession>` `connect(SocketAddress remoteAddress)` Connects to the specified remote address.
`SocketAddress` `getBoundAddress()` Returns the local addresses which are bound currently.
`DatagramChannel` `getDatagramChannel()`
`void` `unbind()` Unbinds from the local addresses that this service is bound to and stops to accept incoming connections.

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

`getSessionConfig, initSecured, setSessionConfig`

### Methods inherited from class org.apache.mina.service.server.AbstractIoServer

`isReuseAddress, setReuseAddress, setSessionConfig`

### 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

#### BioUdpServer

    public BioUdpServer()

Create an UDP server

#### BioUdpServer

    public BioUdpServer(IoHandlerExecutor executor)

#### BioUdpServer

    public BioUdpServer(UdpSessionConfig config,
                IoHandlerExecutor executor)

### Method Detail

#### getDatagramChannel

    public DatagramChannel getDatagramChannel()

#### getBoundAddress

    public SocketAddress getBoundAddress()

Description copied from interface: `IoServer`
Returns the local addresses which are bound currently.

#### bind

    public void bind(SocketAddress localAddress)

Description copied from interface: `IoServer`
Binds to the specified local addresses and start to accept incoming connections.

#### bind

    public void bind(int port)

Description copied from interface: `IoServer`
Binds the server to the specified port.

Parameters:
  `port` - the local TCP port to bind.

#### unbind

    public void unbind()

Description copied from interface: `IoServer`
Unbinds from the local addresses that this service is bound to and stops to accept incoming connections. This method returns silently if no local address is bound yet.

#### connect

    public IoFuture<IoSession> connect(SocketAddress remoteAddress)

Description copied from interface: `IoClient`
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.