Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.common
Interface IoServiceConfig

All Superinterfaces:
  Cloneable

All Known Subinterfaces:
  DatagramServiceConfig, IoAcceptorConfig, IoConnectorConfig

All Known Implementing Classes:
  org.apache.mina.common.support.BaseIoAcceptorConfig, org.apache.mina.common.support.BaseIoConnectorConfig, org.apache.mina.common.support.BaseIoServiceConfig, DatagramAcceptorConfig, DatagramConnectorConfig, SocketAcceptorConfig, SocketConnectorConfig

    public interface IoServiceConfig

extends Cloneable

A configuration which is used to configure `IoService`.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 05:19:00 +0200 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Method Summary
`Object` | `clone()` Returns a deep clone of this configuration.
`DefaultIoFilterChainBuilder` | `getFilterChain()` A shortcut for `( ( DefaultIoFilterChainBuilder )` `getFilterChainBuilder()``)`.
`IoFilterChainBuilder` | `getFilterChainBuilder()` Returns the `IoFilterChainBuilder` which will modify the `IoFilterChain` of all `IoSession`s which is created with this configuration.
`IoSessionConfig` | `getSessionConfig()` Resturns the default configuration of the new `IoSession`s.
`ThreadModel` | `getThreadModel()` Returns the default `ThreadModel` of the `IoService`.
`void` | `setFilterChainBuilder(IoFilterChainBuilder builder)` Sets the `IoFilterChainBuilder` which will modify the `IoFilterChain` of all `IoSession`s which is created with this configuration.
`void` | `setThreadModel(ThreadModel threadModel)` Sets the default `ThreadModel` of the `IoService`.

Method Detail

### getSessionConfig

    IoSessionConfig getSessionConfig()

  Resturns the default configuration of the new `IoSession`s.

### getFilterChainBuilder

    IoFilterChainBuilder getFilterChainBuilder()

  Returns the `IoFilterChainBuilder` which will modify the `IoFilterChain` of all `IoSession`s which is created with this configuration. The default value is an empty `DefaultIoFilterChainBuilder`.

### setFilterChainBuilder

    void setFilterChainBuilder(IoFilterChainBuilder builder)

  Sets the `IoFilterChainBuilder` which will modify the `IoFilterChain` of all `IoSession`s which is created with this configuration. If you specify `null` this property will be set to an empty `DefaultIoFilterChainBuilder`.

### getFilterChain

    DefaultIoFilterChainBuilder getFilterChain()

  A shortcut for `( ( DefaultIoFilterChainBuilder )` `getFilterChainBuilder()``)`. Please note that the returned object is not a real `IoFilterChain` but a `DefaultIoFilterChainBuilder`. Modifying the returned builder won't affect the existing `IoSession`s at all, because `IoFilterChainBuilder`s affect only newly created `IoSession`s.

  Throws:
    `IllegalStateException` - if the current `IoFilterChainBuilder` is not a `DefaultIoFilterChainBuilder`

### getThreadModel

    ThreadModel getThreadModel()

  Returns the default `ThreadModel` of the `IoService`. The default value is a `ExecutorThreadModel`() whose service name is `'AnonymousIoService'` and which has 16 maximum active threads. It is strongly recommended to set a new `ExecutorThreadModel` by calling `ExecutorThreadModel.getInstance(String)`.

### setThreadModel

    void setThreadModel(ThreadModel threadModel)

  Sets the default `ThreadModel` of the `IoService`. If you specify `null`, this property will be set to the default value. The default value is an `ExecutorThreadModel` whose service name is `'AnonymousIoService'` with 16 threads. It is strongly recommended to set a new `ExecutorThreadModel` by calling `ExecutorThreadModel.getInstance(String)`.

### clone

    Object clone()

  Returns a deep clone of this configuration.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.