Class AbstractConnectionClient

All Implemented Interfaces:
Resetable, Channel, ChannelHandler, Client, Endpoint, IdleSensible

public abstract class AbstractConnectionClient extends AbstractClient
  • Method Details

    • increase

      public final void increase()
    • retain

      public final AbstractConnectionClient retain()
      Increments the reference count by 1.
    • release

      public final boolean release()
      Decreases the reference count by 1 and calls
      invalid @link
      {@link this#destroy
      } if the reference count reaches 0.
    • isAvailable

      public abstract boolean isAvailable()
      connection is available.
      Returns:
      boolean
    • createConnectingPromise

      public abstract void createConnectingPromise()
      create connecting promise.
    • addCloseListener

      public abstract void addCloseListener(Runnable func)
      add the listener of close connection event.
      Parameters:
      func - execute function
    • onConnected

      public abstract void onConnected(Object channel)
      when connected, callback.
      Parameters:
      channel - Channel
    • onGoaway

      public abstract void onGoaway(Object channel)
      when goaway, callback.
      Parameters:
      channel - Channel
    • destroy

      public abstract void destroy()
      This method will be invoked when counter reaches 0, override this method to destroy materials related to the specific resource.
    • getChannel

      public abstract Object getChannel(Boolean generalizable)
      if generalizable, return NIOChannel else return Dubbo Channel
      Parameters:
      generalizable - generalizable
      Returns:
      Dubbo Channel or NIOChannel such as NettyChannel
    • getCounter

      public long getCounter()
      Get counter