|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.tribes.transport.AbstractSender org.apache.catalina.tribes.transport.bio.BioSender
public class BioSender
Send cluster messages with only one socket. Ack and keep Alive Handling is supported
Field Summary | |
---|---|
protected XByteBuffer |
ackbuf
|
protected static StringManager |
sm
The string manager for this package. |
Constructor Summary | |
---|---|
BioSender()
|
Method Summary | |
---|---|
protected void |
closeSocket()
Close socket. |
void |
connect()
Connect other cluster member receiver |
void |
disconnect()
disconnect and close socket |
String |
getInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version> . |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final StringManager sm
protected XByteBuffer ackbuf
Constructor Detail |
---|
public BioSender()
Method Detail |
---|
public String getInfo()
<description>/<version>
.
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
public String toString()
toString
in class Object
protected void openSocket() throws IOException
IOException
protected void closeSocket()
disconnect()
protected void pushMessage(byte[] data, boolean reconnect, boolean waitForAck) throws IOException
data
- data to send
IOException
closeSocket()
,
openSocket()
,
sendMessage(byte[], boolean)
protected void waitForAck() throws IOException
IOException
SocketTimeoutException
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |