Package org.apache.catalina.ha.backend
Class TcpSender
- java.lang.Object
-
- org.apache.catalina.ha.backend.TcpSender
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.BufferedReader[]connectionReadersReaders for active connections.protected java.net.Socket[]connectionsActive socket connections to proxies.protected java.io.BufferedWriter[]connectionWritersWriters for active connections.protected Proxy[]proxiesProxies.
-
Constructor Summary
Constructors Constructor Description TcpSender()Constructs a new TcpSender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose(int i)Close connection.voidinit(HeartbeatListener config)Set the configuration parametersintsend(java.lang.String mess)Send the message to the proxies
-
-
-
Field Detail
-
proxies
protected Proxy[] proxies
Proxies.
-
connections
protected java.net.Socket[] connections
Active socket connections to proxies.
-
connectionReaders
protected java.io.BufferedReader[] connectionReaders
Readers for active connections.
-
connectionWriters
protected java.io.BufferedWriter[] connectionWriters
Writers for active connections.
-
-
Method Detail
-
init
public void init(HeartbeatListener config) throws java.lang.Exception
Description copied from interface:SenderSet the configuration parameters
-
send
public int send(java.lang.String mess) throws java.lang.ExceptionDescription copied from interface:SenderSend the message to the proxies
-
close
protected void close(int i)
Close connection.- Parameters:
i- The index of the connection that will be closed
-
-