Class ConnectionPoolLoggingListener
java.lang.Object
com.linecorp.armeria.client.logging.ConnectionPoolLoggingListener
- All Implemented Interfaces:
ConnectionPoolListener
public final class ConnectionPoolLoggingListener extends Object implements ConnectionPoolListener
Decorates a
ConnectionPoolListener
to log the connection pool events.-
Constructor Summary
Constructors Constructor Description ConnectionPoolLoggingListener()
Creates a new instance with a system ticker.ConnectionPoolLoggingListener(Ticker ticker)
Creates a new instance with an alternativeTicker
. -
Method Summary
Modifier and Type Method Description void
connectionClosed(SessionProtocol protocol, InetSocketAddress remoteAddr, InetSocketAddress localAddr, AttributeMap attrs)
Invoked when a connection in the connection pool has been closed.void
connectionOpen(SessionProtocol protocol, InetSocketAddress remoteAddr, InetSocketAddress localAddr, AttributeMap attrs)
Invoked when a new connection is open and ready to send a request.
-
Constructor Details
-
ConnectionPoolLoggingListener
public ConnectionPoolLoggingListener()Creates a new instance with a system ticker. -
ConnectionPoolLoggingListener
Creates a new instance with an alternativeTicker
.- Parameters:
ticker
- an alternativeTicker
-
-
Method Details
-
connectionOpen
public void connectionOpen(SessionProtocol protocol, InetSocketAddress remoteAddr, InetSocketAddress localAddr, AttributeMap attrs) throws ExceptionDescription copied from interface:ConnectionPoolListener
Invoked when a new connection is open and ready to send a request.- Specified by:
connectionOpen
in interfaceConnectionPoolListener
- Throws:
Exception
-
connectionClosed
public void connectionClosed(SessionProtocol protocol, InetSocketAddress remoteAddr, InetSocketAddress localAddr, AttributeMap attrs) throws ExceptionDescription copied from interface:ConnectionPoolListener
Invoked when a connection in the connection pool has been closed.- Specified by:
connectionClosed
in interfaceConnectionPoolListener
- Throws:
Exception
-