Tabnine Logo
ChannelManager.removeAll
Code IndexAdd Tabnine to your IDE (free)

How to use
removeAll
method
in
com.ning.http.client.providers.netty.channel.ChannelManager

Best Java code snippets using com.ning.http.client.providers.netty.channel.ChannelManager.removeAll (Showing top 4 results out of 315)

origin: com.ning/async-http-client

public void closeChannel(Channel channel) {
  // The channel may have already been removed from the future if a timeout occurred, and this method may be called just after.
  LOGGER.debug("Closing Channel {} ", channel);
  try {
    removeAll(channel);
    Channels.setDiscard(channel);
    Channels.silentlyCloseChannel(channel);
  } catch (Throwable t) {
    LOGGER.debug("Error closing a connection", t);
  }
  openChannels.remove(channel);
}
origin: com.ning/async-http-client

@Override
public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
  if (requestSender.isClosed())
    return;
  Channel channel = ctx.getChannel();
  channelManager.removeAll(channel);
  try {
    super.channelClosed(ctx, e);
  } catch (Exception ex) {
    LOGGER.trace("super.channelClosed", ex);
  }
  Object attribute = Channels.getAttribute(channel);
  LOGGER.debug("Channel Closed: {} with attribute {}", channel, attribute);
  if (attribute instanceof Callback) {
    Callback callback = (Callback) attribute;
    Channels.setAttribute(channel, callback.future());
    callback.call();
  } else if (attribute instanceof NettyResponseFuture<?>) {
    NettyResponseFuture<?> future = (NettyResponseFuture<?>) attribute;
    future.touch();
    if (!config.getIOExceptionFilters().isEmpty()
        && requestSender.applyIoExceptionFiltersAndReplayRequest(future, CHANNEL_CLOSED_EXCEPTION, channel))
      return;
    protocol.onClose(future);
    requestSender.handleUnexpectedClosedChannel(channel, future);
  }
}
origin: io.gatling/async-http-client

public void closeChannel(Channel channel) {
  removeAll(channel);
  Channels.setDiscard(channel);
  // The channel may have already been removed if a timeout occurred, and this method may be called just after.
  if (channel != null) {
    LOGGER.debug("Closing Channel {} ", channel);
    try {
      channel.close();
    } catch (Throwable t) {
      LOGGER.debug("Error closing a connection", t);
    }
    openChannels.remove(channel);
  }
}
origin: io.gatling/async-http-client

@Override
public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
  if (requestSender.isClosed())
    return;
  Channel channel = ctx.getChannel();
  channelManager.removeAll(channel);
  try {
    super.channelClosed(ctx, e);
  } catch (Exception ex) {
    LOGGER.trace("super.channelClosed", ex);
  }
  Object attribute = Channels.getAttribute(channel);
  LOGGER.debug("Channel Closed: {} with attribute {}", channel, attribute);
  if (attribute instanceof Callback) {
    Callback callback = (Callback) attribute;
    Channels.setAttribute(channel, callback.future());
    callback.call();
  } else if (attribute instanceof NettyResponseFuture<?>) {
    NettyResponseFuture<?> future = (NettyResponseFuture<?>) attribute;
    future.touch();
    if (!config.getIOExceptionFilters().isEmpty()
        && requestSender.applyIoExceptionFiltersAndReplayRequest(future, CHANNEL_CLOSED_EXCEPTION, channel))
      return;
    protocol.onClose(channel);
    if (future == null || future.isDone())
      channelManager.closeChannel(channel);
    else if (!requestSender.retry(future, ctx.getChannel()))
      requestSender.abort(future, REMOTELY_CLOSED_EXCEPTION);
  }
}
com.ning.http.client.providers.netty.channelChannelManagerremoveAll

Popular methods of ChannelManager

  • <init>
  • abortChannelPreemption
  • close
  • closeChannel
  • configureBootstraps
  • createSslHandler
  • getBootstrap
  • getFreeConnectionsForHost
  • isSslHandlerConfigured
  • newDrainCallback
  • newHttpClientCodec
  • poll
  • newHttpClientCodec,
  • poll,
  • preemptChannel,
  • registerOpenChannel,
  • tryAcquireGlobal,
  • tryAcquirePerHost,
  • tryToOfferChannelToPool,
  • upgradePipelineForWebSockets,
  • upgradeProtocol

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JCheckBox (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now