org.apache.mina.service.server

## Class AbstractIoServer

- java.lang.Object
- - org.apache.mina.service.AbstractIoService
  - - org.apache.mina.service.server.AbstractIoServer

- All Implemented Interfaces:
    IoServer, IoService
  Direct Known Subclasses:
    AbstractTcpServer, AbstractUdpServer

      public abstract class AbstractIoServer
      extends AbstractIoService
      implements IoServer

  Base implementation for `IoServer`s.
  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
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractIoServer(IoSessionConfig config, IoHandlerExecutor eventExecutor)` Create an new AbstractIoServer instance

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IoSessionConfig` | `getSessionConfig()` Returns the default configuration of the new `IoSession`s created by this service.
    `boolean` | `isReuseAddress()` Is the reuse address enabled for this server.
    `void` | `setReuseAddress(boolean reuseAddress)` Set the reuse address flag on the server socket
    `void` | `setSessionConfig(IoSessionConfig config)` Set the default configuration for created TCP sessions

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

    - ### Methods inherited from interface org.apache.mina.api.IoServer

      `bind, bind, getBoundAddress, unbind`

- - ### Constructor Detail

    - #### AbstractIoServer

          protected AbstractIoServer(IoSessionConfig config,
                          IoHandlerExecutor eventExecutor)

      Create an new AbstractIoServer instance
      Parameters:
        `eventExecutor` - used for executing IoHandler event in another pool of thread (not in the low level I/O one). Use `null` if you don't want one. Be careful, the IoHandler processing will block the I/O operations.

  - ### Method Detail

    - #### setReuseAddress

          public void setReuseAddress(boolean reuseAddress)

      Set the reuse address flag on the server socket
      Parameters:
        `reuseAddress` - `true` to enable

    - #### isReuseAddress

          public boolean isReuseAddress()

      Is the reuse address enabled for this server.
      Returns:

    - #### getSessionConfig

          public IoSessionConfig getSessionConfig()

      Returns the default configuration of the new `IoSession`s created by this service.
      Specified by:
        `getSessionConfig` in interface `IoService`
      Returns:
        The default configuration for this `IoService`

    - #### setSessionConfig

          public void setSessionConfig(IoSessionConfig config)

      Set the default configuration for created TCP sessions
      Parameters:
        `config` -

Copyright © 2009–2013 Apache MINA Project. All rights reserved.