org.apache.ignite.internal.client.router

## Interface GridTcpRouter

All Known Implementing Classes:
  GridTcpRouterImpl

    public interface GridTcpRouter

TCP router interface.

Router allows remote clients to connect to grid without direct access to the network where grid is running. It accepts requests on the same protocol as grid rest server and establish required connection to grid nodes to serve them.

Below is an example on how to start TCP router with non-default configuration.

     GridTcpRouterConfiguration cfg =
         new GridTcpRouterConfiguration();

     cfg.setHost("router.appdomain.com");
     cfg.setPort(11211);

     cfg.setServers(Arrays.asList(
         "node1.appdomain.com:11211",
         "node2.appdomain.com:11211"));

     GridRouterFactory.startTcpRouter(cfg);

Note that clients should be specifically configured in order to use router. Please refer to `GridClientConfiguration.getServers()` and `GridClientConfiguration.getRouters()` documentation for more details.

Instances of this interface are managed through `GridRouterFactory`.

See Also:
  `GridTcpRouterConfiguration`

### Method Summary

Methods
`GridTcpRouterConfiguration` `configuration()` Returns configuration used to start router.
`UUID` `id()` Returns router Id.

### Method Detail

#### id

    UUID id()

Returns router Id.

Unique router Ids are automatically generated on router startup. They are used to control router's lifecycle via `GridRouterFactory`.

Returns:
  Router Id.
See Also:
  `GridRouterFactory.tcpRouter(UUID)`, `GridRouterFactory.stopTcpRouter(UUID)`

#### configuration

    GridTcpRouterConfiguration configuration()

Returns configuration used to start router.

Returns:
  Router configuration.
See Also:
  `GridRouterFactory.startTcpRouter(GridTcpRouterConfiguration)`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.1.0-incubating
Release Date | : May 20 2015