org.apache.ignite.internal.util.ipc.loopback

## Class IpcClientTcpEndpoint

- java.lang.Object
- - org.apache.ignite.internal.util.ipc.loopback.IpcClientTcpEndpoint

All Implemented Interfaces:
  Closeable, AutoCloseable, IpcEndpoint

    public class IpcClientTcpEndpoint
    extends Object
    implements IpcEndpoint

Loopback IPC endpoint based on socket.

### Constructor Summary

Constructors
Constructor and Description
`IpcClientTcpEndpoint(Socket clientSock)` Creates connected client IPC endpoint.
`IpcClientTcpEndpoint(String host, int port)` Creates and connects client IPC endpoint.

### Method Summary

Methods
`void` `close()` Closes endpoint.
`InputStream` `inputStream()` Gets input stream associated with this IPC endpoint.
`OutputStream` `outputStream()` Gets output stream associated with this IPC endpoint.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### IpcClientTcpEndpoint

    public IpcClientTcpEndpoint(Socket clientSock)

Creates connected client IPC endpoint.

Parameters:
  `clientSock` - Connected client socket.

#### IpcClientTcpEndpoint

    public IpcClientTcpEndpoint(String host,
                        int port)
                         throws IgniteCheckedException

Creates and connects client IPC endpoint.

Parameters:
  `port` - Port.
  `host` - Host.
Throws:
  `IgniteCheckedException` - If connection fails.

### Method Detail

#### inputStream

    public InputStream inputStream()
                            throws IgniteCheckedException

Gets input stream associated with this IPC endpoint.

Specified by:
  `inputStream` in interface `IpcEndpoint`
Returns:
  IPC input stream.
Throws:
  `IgniteCheckedException` - If error occurred.

#### outputStream

    public OutputStream outputStream()
                              throws IgniteCheckedException

Gets output stream associated with this IPC endpoint.

Specified by:
  `outputStream` in interface `IpcEndpoint`
Returns:
  IPC output stream.
Throws:
  `IgniteCheckedException` - If error occurred.

#### close

    public void close()

Closes endpoint. Note that IPC endpoint may acquire native resources so it must be always closed once it is not needed.

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `IpcEndpoint`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.6.0
Release Date | : May 18 2016