public class BioSender extends AbstractSender
Modifier and Type | Field and Description |
---|---|
protected XByteBuffer |
ackbuf |
protected static StringManager |
sm
The string manager for this package.
|
Constructor and Description |
---|
BioSender() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeSocket()
Close socket.
|
void |
connect()
Connect other cluster member receiver
|
void |
disconnect()
disconnect and close socket
|
protected void |
openSocket()
open real socket and set time out when waitForAck is enabled
is socket open return directly
|
protected void |
pushMessage(byte[] data,
boolean reconnect,
boolean waitForAck)
Push messages with only one socket at a time
Wait for ack is needed and make auto retry when write message is failed.
|
void |
sendMessage(byte[] data,
boolean waitForAck)
Send message.
|
String |
toString()
Name of this SockerSender
|
protected void |
waitForAck()
Wait for Acknowledgement from other server.
|
getAddress, getAttempt, getConnectTime, getDestination, getDirectBuffer, getKeepAliveCount, getKeepAliveTime, getMaxRetryAttempts, getOoBInline, getPort, getRequestCount, getRxBufSize, getSoKeepAlive, getSoLingerOn, getSoLingerTime, getSoReuseAddress, getSoTrafficClass, getTcpNoDelay, getThrowOnFailedAck, getTimeout, getTxBufSize, getUdpPort, getUdpRxBufSize, getUdpTxBufSize, isConnected, isUdpBased, keepalive, setAddress, setAttempt, setConnected, setConnectTime, setDestination, setDirectBuffer, setKeepAliveCount, setKeepAliveTime, setMaxRetryAttempts, setOoBInline, setPort, setRequestCount, setRxBufSize, setSoKeepAlive, setSoLingerOn, setSoLingerTime, setSoReuseAddress, setSoTrafficClass, setTcpNoDelay, setThrowOnFailedAck, setTimeout, setTxBufSize, setUdpBased, setUdpPort, setUdpRxBufSize, setUdpTxBufSize, transferProperties
protected static final StringManager sm
protected final XByteBuffer ackbuf
public void connect() throws IOException
connect
in interface DataSender
connect
in class AbstractSender
IOException
- TODO Implement this org.apache.catalina.tribes.transport.DataSender methodDataSender.connect()
public void disconnect()
disconnect
in interface DataSender
disconnect
in class AbstractSender
DataSender.disconnect()
public void sendMessage(byte[] data, boolean waitForAck) throws IOException
IOException
protected void openSocket() throws IOException
IOException
protected void closeSocket()
disconnect()
protected void pushMessage(byte[] data, boolean reconnect, boolean waitForAck) throws IOException
data
- data to sendIOException
closeSocket()
,
openSocket()
,
sendMessage(byte[], boolean)
protected void waitForAck() throws IOException
IOException
SocketTimeoutException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.