Package org.jgroups.blocks.cs
Class TcpBaseServer
- java.lang.Object
-
- org.jgroups.blocks.cs.BaseServer
-
- org.jgroups.blocks.cs.TcpBaseServer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ConnectionListener
public abstract class TcpBaseServer extends BaseServer
Common base class for TCP based clients and servers- Since:
- 3.6.5
- Author:
- Bela Ban
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgroups.blocks.cs.BaseServer
BaseServer.Reaper
-
-
Field Summary
Fields Modifier and Type Field Description protected int
buffered_inputstream_size
protected int
buffered_outputstream_size
protected int
max_send_queue
protected boolean
non_blocking_sends
protected int
peer_addr_read_timeout
-
Fields inherited from class org.jgroups.blocks.cs.BaseServer
client_bind_addr, client_bind_port, conn_expire_time, conn_listeners, conns, defer_client_binding, factory, linger, local_addr, log, log_details, max_length, OK, reaper, reaperInterval, receiver, recv_buf_size, running, send_buf_size, sock_conn_timeout, socket_factory, tcp_nodelay, time_service, use_acks, use_peer_connections
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TcpBaseServer(ThreadFactory f, SocketFactory sf, int recv_buf_size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TcpConnection
createConnection(Address dest)
Creates a new connection object to target dest, but doesn't yet connect itint
getBufferedInputStreamSize()
int
getBufferedOutputStreamSize()
int
maxSendQueue()
TcpBaseServer
maxSendQueue(int s)
boolean
nonBlockingSends()
TcpBaseServer
nonBlockingSends(boolean b)
int
peerAddressReadTimeout()
TcpBaseServer
peerAddressReadTimeout(int t)
TcpBaseServer
setBufferedInputStreamSize(int s)
TcpBaseServer
setBufferedOutputStreamSize(int s)
-
Methods inherited from class org.jgroups.blocks.cs.BaseServer
addConnection, addConnectionListener, clearConnections, clientBindAddress, clientBindAddress, clientBindPort, clientBindPort, close, closeConnection, closeConnection, closeConnection, closeConnection, connected, connectionClosed, connectionEstablished, connectionEstablishedTo, connExpireTime, connExpireTimeout, deferClientBinding, deferClientBinding, explanation, flush, flushAll, forAllConnections, getConnection, getConnection, getMaxLength, getNumConnections, getNumOpenConnections, hasConnection, linger, linger, localAddress, localAddress, log, log, logDetails, logDetails, notifyConnectionClosed, notifyConnectionEstablished, printConnections, reaperInterval, reaperInterval, receive, receive, receive, receiveBufferSize, receiveBufferSize, receiver, receiver, removeConnectionIfPresent, removeConnectionListener, replaceConnection, retainAll, running, send, send, sendBufferSize, sendBufferSize, sendToAll, sendToAll, setMaxLength, socketConnectionTimeout, socketConnectionTimeout, socketFactory, socketFactory, start, stop, tcpNodelay, tcpNodelay, timeService, timeService, toString, toString, useAcks, useAcks, usePeerConnections, usePeerConnections, validateArgs
-
-
-
-
Field Detail
-
peer_addr_read_timeout
protected int peer_addr_read_timeout
-
buffered_inputstream_size
protected int buffered_inputstream_size
-
buffered_outputstream_size
protected int buffered_outputstream_size
-
non_blocking_sends
protected boolean non_blocking_sends
-
max_send_queue
protected int max_send_queue
-
-
Constructor Detail
-
TcpBaseServer
protected TcpBaseServer(ThreadFactory f, SocketFactory sf, int recv_buf_size)
-
-
Method Detail
-
createConnection
protected TcpConnection createConnection(Address dest) throws java.lang.Exception
Description copied from class:BaseServer
Creates a new connection object to target dest, but doesn't yet connect it- Specified by:
createConnection
in classBaseServer
- Throws:
java.lang.Exception
-
peerAddressReadTimeout
public int peerAddressReadTimeout()
-
peerAddressReadTimeout
public TcpBaseServer peerAddressReadTimeout(int t)
-
getBufferedInputStreamSize
public int getBufferedInputStreamSize()
-
setBufferedInputStreamSize
public TcpBaseServer setBufferedInputStreamSize(int s)
-
getBufferedOutputStreamSize
public int getBufferedOutputStreamSize()
-
setBufferedOutputStreamSize
public TcpBaseServer setBufferedOutputStreamSize(int s)
-
nonBlockingSends
public boolean nonBlockingSends()
-
nonBlockingSends
public TcpBaseServer nonBlockingSends(boolean b)
-
maxSendQueue
public int maxSendQueue()
-
maxSendQueue
public TcpBaseServer maxSendQueue(int s)
-
-