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.
|
java.lang.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 java.io.IOException
connect
in interface DataSender
connect
in class AbstractSender
java.io.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 java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
protected void openSocket() throws java.io.IOException
java.io.IOException
protected void closeSocket()
disconnect()
protected void pushMessage(byte[] data, boolean reconnect, boolean waitForAck) throws java.io.IOException
data
- data to sendjava.io.IOException
closeSocket()
,
openSocket()
,
sendMessage(byte[], boolean)
protected void waitForAck() throws java.io.IOException
java.io.IOException
java.net.SocketTimeoutException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.