public class TCPTransportClient extends Object implements Runnable
| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
buffer |
protected int |
bufferSize |
static int |
DEFAULT_BUFFER_SIZE |
static int |
DEFAULT_STORAGE_SIZE |
protected InetSocketAddress |
destAddress |
protected Lock |
lock |
protected InetSocketAddress |
origAddress |
protected Thread |
selfThread |
protected SocketChannel |
socketChannel |
protected boolean |
stop |
protected ByteBuffer |
storage |
protected int |
storageSize |
| Constructor and Description |
|---|
TCPTransportClient() |
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
getDestAddress() |
InetSocketAddress |
getOrigAddress() |
TCPClientConnection |
getParent() |
void |
initialize()
Network init socket
|
void |
initialize(Socket socket) |
void |
release() |
void |
run() |
void |
sendMessage(ByteBuffer bytes) |
void |
setDestAddress(InetSocketAddress address) |
void |
setOrigAddress(InetSocketAddress address) |
void |
start() |
void |
stop() |
String |
toString() |
public static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_STORAGE_SIZE
protected boolean stop
protected Thread selfThread
protected int bufferSize
protected ByteBuffer buffer
protected InetSocketAddress destAddress
protected InetSocketAddress origAddress
protected SocketChannel socketChannel
protected Lock lock
protected int storageSize
protected ByteBuffer storage
public void initialize()
throws IOException,
NotInitializedException
IOExceptionNotInitializedExceptionpublic TCPClientConnection getParent()
public void initialize(Socket socket) throws IOException, NotInitializedException
IOExceptionNotInitializedExceptionpublic void start()
throws NotInitializedException
NotInitializedExceptionpublic InetSocketAddress getDestAddress()
public void setDestAddress(InetSocketAddress address)
public void setOrigAddress(InetSocketAddress address)
public InetSocketAddress getOrigAddress()
public void sendMessage(ByteBuffer bytes) throws IOException
IOExceptionCopyright © 2016. All Rights Reserved.