io.netty.util.concurrent.Promise.removeListener()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(262)

本文整理了Java中io.netty.util.concurrent.Promise.removeListener()方法的一些代码示例,展示了Promise.removeListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Promise.removeListener()方法的具体详情如下:
包路径:io.netty.util.concurrent.Promise
类名称:Promise
方法名:removeListener

Promise.removeListener介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

@Override
public RPromise<T> removeListener(FutureListener<? super T> listener) {
  promise.removeListener(listener);
  return this;
}

代码示例来源:origin: redisson/redisson

@Override
public RPromise<T> removeListener(FutureListener<? super T> listener) {
  promise.removeListener(listener);
  return this;
}

代码示例来源:origin: line/armeria

@Override
public Promise<T> removeListener(
    GenericFutureListener<? extends Future<? super T>> listener) {
  return delegate.removeListener(listener);
}

代码示例来源:origin: org.redisson/redisson

@Override
public RPromise<T> removeListener(FutureListener<? super T> listener) {
  promise.removeListener(listener);
  return this;
}

代码示例来源:origin: jurmous/etcd4j

/**
 * Attach Netty Promise
 *
 * @param promise netty promise to set up response promise with
 */
public void attachNettyPromise(Promise<T> promise) {
 promise.addListener(promiseHandler);
 Promise<T> oldPromise = this.promise;
 this.promise = promise;
 if (oldPromise != null) {
  oldPromise.removeListener(promiseHandler);
  oldPromise.cancel(true);
 }
}

代码示例来源:origin: org.nanoframework/nano-ext-etcd

/**
 * Attach Netty Promise
 *
 * @param promise netty promise to set up response promise with
 */
public void attachNettyPromise(Promise<T> promise) {
 promise.addListener(promiseHandler);
 Promise<T> oldPromise = this.promise;
 this.promise = promise;
 if (oldPromise != null) {
  oldPromise.removeListener(promiseHandler);
  oldPromise.cancel(true);
 }
}

相关文章