org.apache.mina.api

## Interface IoService

- All Known Implementing Classes:
    AbstractIoClient, AbstractIoServer, AbstractIoService, AbstractTcpClient, AbstractTcpServer, AbstractUdpClient, AbstractUdpServer, BioUdpServer, NioTcpClient, NioTcpServer, NioUdpClient, NioUdpServer

      public interface IoService

  Base interface for all `IoServer`s and `IoClient`s that provide I/O service and manage `IoSession` s.
  Author:
    Apache MINA Project

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IoFilter[]` | `getFilters()` Get the list of filters installed on this service
    `IoHandler` | `getIoHandler()` Get the `IoHandler` in charge of your business logic for this service.
    `IoHandlerExecutor` | `getIoHandlerExecutor()` Get the `IoHandlerExecutor` used for executing `IoHandler` events in another pool of thread (not in the low level I/O one).
    `Map<Long,IoSession>` | `getManagedSessions()` Returns the map of all sessions which are currently managed by this service.
    `IoSessionConfig` | `getSessionConfig()` Returns the default configuration of the new `IoSession`s created by this service.
    `void` | `setFilters(IoFilter... filters)` Set the list of filters for this service.
    `void` | `setIoHandler(IoHandler handler)` Set the `IoHandler` in charge of your business logic for this service.

- - ### Method Detail

    - #### getManagedSessions

          Map<Long,IoSession> getManagedSessions()

      Returns the map of all sessions which are currently managed by this service. The key of map is the `ID` of the session.
      Returns:
        the sessions. An empty collection if there's no session.

    - #### setIoHandler

          void setIoHandler(IoHandler handler)

      Set the `IoHandler` in charge of your business logic for this service.
      Parameters:
        `handler` - the handler called for every event of the service (new connections, messages received, etc..)

    - #### getIoHandler

          IoHandler getIoHandler()

      Get the `IoHandler` in charge of your business logic for this service.
      Returns:
        the handler called for every event of the service (new connections, messages received, etc..)

    - #### getIoHandlerExecutor

          IoHandlerExecutor getIoHandlerExecutor()

      Get the `IoHandlerExecutor` used for executing `IoHandler` events in another pool of thread (not in the low level I/O one).

    - #### getFilters

          IoFilter[] getFilters()

      Get the list of filters installed on this service
      Returns:
        The list of installed filters

    - #### setFilters

          void setFilters(IoFilter... filters)

      Set the list of filters for this service. Must be called before the service is bound/connected
      Parameters:
        `The` - list of filters to inject in the filters chain

    - #### getSessionConfig

          IoSessionConfig getSessionConfig()

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

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