|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.epam.common.transport.SocketTransport com.epam.common.transport.client.tcp.TCPTransport
public class TCPTransport
TCP socket transport implementation.
Field Summary |
---|
Fields inherited from class com.epam.common.transport.SocketTransport |
---|
is, os, socket |
Constructor Summary | |
---|---|
TCPTransport()
Creates transport. |
|
TCPTransport(String host,
int port)
Creates transport. |
|
TCPTransport(String host,
int port,
boolean enableTcpNoDelay)
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.SocketTransport |
---|
getAddress, getInputStream, getOutputStream, getPort, isBlockingSocket, read, read, read, read, 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 TCPTransport()
public TCPTransport(String host, int port)
host
- the transport hostport
- the transport portpublic TCPTransport(String host, int port, boolean enableTcpNoDelay)
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 SocketTransport
IOException
- - throws if error occurredTransport.open()
public void close() throws IOException
Transport
close
in interface Transport
close
in class SocketTransport
IOException
- - throws if error occurredTransport.close()
public boolean isOpen()
Transport
isOpen
in interface Transport
isOpen
in class SocketTransport
Transport.isOpen()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |