|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.epam.common.transport.NIOSocketTransport com.epam.common.transport.client.tcp.NIOTCPTransport
public class NIOTCPTransport
TCP socket transport implementation.
Field Summary |
---|
Fields inherited from class com.epam.common.transport.NIOSocketTransport |
---|
BLOCKING_SOCKETS_FLAG, is, isBlocking, os, readSelectionKey, readSelector, socket, SOCKET_READ_SIZE, socketChannel, SPINNING_READ_FLAG, useSpinningReadSelect, writeSelectionKey, writeSelector |
Constructor Summary | |
---|---|
NIOTCPTransport()
Creates transport. |
|
NIOTCPTransport(String host,
int port)
Creates transport. |
|
NIOTCPTransport(String host,
int port,
boolean enableTcpNoDelay,
HashMap<String,Object> connectivityParams)
Creates transport. |
Method Summary | |
---|---|
void |
close()
Close the transport. |
boolean |
isOpen()
Returns true if, transport is open. |
void |
open()
Open the transport. |
void |
setAddress(String host)
Setter for address. |
void |
setPort(int port)
Setter for port. |
void |
setSocketFactory(SocketFactory socketFactory)
Setter for socket factory transport. |
Methods inherited from class com.epam.common.transport.NIOSocketTransport |
---|
getAddress, getPort, isBlockingSocket, read, read, read, read, setSessionConnectivityParams, waitUntilReadyToWrite, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.epam.common.transport.client.ClientTransport |
---|
read, read, write, write |
Methods inherited from interface com.epam.common.transport.Transport |
---|
getAddress, getPort, isBlockingSocket, read, read, waitUntilReadyToWrite, write, write |
Constructor Detail |
---|
public NIOTCPTransport()
public NIOTCPTransport(String host, int port)
host
- the transport hostport
- the transport portpublic NIOTCPTransport(String host, int port, boolean enableTcpNoDelay, HashMap<String,Object> connectivityParams)
host
- the transport hostport
- the transpot portenableTcpNoDelay
- enable/disable nagle sockets algorithmMethod Detail |
---|
public void setSocketFactory(SocketFactory socketFactory)
setSocketFactory
in interface ClientTransport
socketFactory
- the socket factorypublic void setAddress(String host)
ClientTransport
setAddress
in interface ClientTransport
ClientTransport.setAddress(String)
public void setPort(int port)
ClientTransport
setPort
in interface ClientTransport
ClientTransport.setPort(int)
public void open() throws IOException
Transport
open
in interface Transport
open
in class NIOSocketTransport
IOException
- - throws if error occurredTransport.open()
public void close() throws IOException
Transport
close
in interface Transport
close
in class NIOSocketTransport
IOException
- - throws if error occurredTransport.close()
public boolean isOpen()
Transport
isOpen
in interface Transport
isOpen
in class NIOSocketTransport
Transport.isOpen()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |