All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hyperfoil.api.connection.Connection Maven / Gradle / Ivy

There is a newer version: 0.27
Show newest version
package io.hyperfoil.api.connection;

import java.io.IOException;

import io.netty.channel.ChannelHandlerContext;

public interface Connection {
   IOException CLOSED_EXCEPTION = new IOException("Connection was unexpectedly closed.");
   IOException SELF_CLOSED_EXCEPTION = new IOException("Connection was closed by us.");

   ChannelHandlerContext context();

   void onAcquire();

   boolean isAvailable();

   int inFlight();

   /**
    * This is an external request to close the connection
    */
   void close();

   /**
    * Invoked by the pool when the connection got closed.
    */
   void setClosed();

   boolean isOpen();

   boolean isClosed();

   String host();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy