public class NIOTCPTransport extends NIOSocketTransport implements ClientTransport
BLOCKING_SOCKETS_FLAG, isBlocking, readSelectionKey, readSelector, receiveBufferSize, sendBufferSize, socket, SOCKET_READ_SIZE, socketChannel, SPINNING_READ_FLAG, useSpinningReadSelect, writeSelectionKey, writeSelector
Constructor and Description |
---|
NIOTCPTransport()
Creates transport.
|
NIOTCPTransport(String host,
int port)
Creates transport.
|
NIOTCPTransport(String host,
int port,
boolean enableTcpNoDelay,
HashMap<String,Object> connectivityParams)
Creates transport.
|
NIOTCPTransport(String host,
int port,
boolean enableTcpNoDelay,
Map<String,Object> connectivityParams,
int sendBufferSize,
int receiveBufferSize)
Creates transport.
|
Modifier and Type | Method and Description |
---|---|
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.
|
close, getAddress, getInetAddress, getLocalPort, getPort, getSSLCertificates, getSSLCipherSuite, getSSLProtocol, isBlockingSocket, isOpen, read, read, read, read, setSessionConnectivityParams, waitUntilReadyToWrite, write, write, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read, read, write, write
close, getAddress, getInetAddress, getLocalPort, getPort, getSSLCertificates, getSSLCipherSuite, getSSLProtocol, isBlockingSocket, isOpen, read, read, waitUntilReadyToWrite, write, write
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 algorithmpublic NIOTCPTransport(String host, int port, boolean enableTcpNoDelay, Map<String,Object> connectivityParams, int sendBufferSize, int receiveBufferSize)
host
- the transport hostport
- the transpot portenableTcpNoDelay
- enable/disable nagle sockets algorithmsendBufferSize
- send buffer sizereceiveBufferSize
- receive buffer sizepublic 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()
Copyright © 2000–2022 EPAM Systems. All rights reserved.