org.apache.mina.transport.tcp

## Class AbstractTcpClient

- java.lang.Object
- - org.apache.mina.service.AbstractIoService
  - - org.apache.mina.service.client.AbstractIoClient
    - - org.apache.mina.transport.tcp.AbstractTcpClient

All Implemented Interfaces:
  IoClient, IoService

Direct Known Subclasses:
  NioTcpClient

    public abstract class AbstractTcpClient
    extends AbstractIoClient

Base class for TCP based Clients

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
`protected` `AbstractTcpClient(IoHandlerExecutor ioHandlerExecutor)` Create an new AbsractTcpClient instance

### Method Summary

Methods
`int` `getConnectTimeoutMillis()` Returns the connect timeout in milliseconds.
`TcpSessionConfig` `getSessionConfig()` Returns the default configuration of the new `IoSession`s created by this service.
`void` `setConnectTimeoutMillis(int connectTimeoutInMillis)` Sets the connect timeout in milliseconds.
`void` `setSessionConfig(TcpSessionConfig 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.IoClient

`connect`

### Constructor Detail

#### AbstractTcpClient

    protected AbstractTcpClient(IoHandlerExecutor ioHandlerExecutor)

Create an new AbsractTcpClient instance

### Method Detail

#### getSessionConfig

    public TcpSessionConfig getSessionConfig()

Returns the default configuration of the new `IoSession`s created by this service.

Returns:
  The default configuration for this `IoService`

#### setSessionConfig

    public void setSessionConfig(TcpSessionConfig config)

Set the default configuration for created TCP sessions

Parameters:
  `config` -

#### getConnectTimeoutMillis

    public int getConnectTimeoutMillis()

Returns the connect timeout in milliseconds. The default value is 10 seconds.

Returns:
  the connect timeout in milliseconds

#### setConnectTimeoutMillis

    public void setConnectTimeoutMillis(int connectTimeoutInMillis)

Sets the connect timeout in milliseconds. The default value is 1 minute.

Parameters:
  `connectTimeoutInMillis` - Connection timeout in ms