org.vertx.java.core.Handler类的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(154)

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

Handler介绍

[英]A generic event handler

This interface is used heavily throughout vert.x as a handler for all types of asynchronous occurrences.
[中]通用事件处理程序
该接口在整个vert中大量使用。x作为所有类型异步事件的处理程序。

代码示例

代码示例来源:origin: org.vert-x/vertx-core

void handleData(Buffer buffer) {
 if (dataHandler != null) {
  checkContext();
  dataHandler.handle(buffer);
 }
}

代码示例来源:origin: org.vert-x/vertx-platform

private void callDoneHandler(Handler<String> doneHandler, String deploymentID) {
 if (doneHandler != null) {
  doneHandler.handle(deploymentID);
 }
}

代码示例来源:origin: org.vert-x/vertx-core

void handleChunk(Buffer data) {
 if (dataHandler != null) {
  dataHandler.handle(data);
 }
}

代码示例来源:origin: org.vert-x/vertx-core

void handleEnd(HttpChunkTrailer trailer) {
 this.trailer = trailer;
 if (endHandler != null) {
  endHandler.handle(null);
 }
}

代码示例来源:origin: org.vert-x/vertx-core

private void checkDrained() {
 if (drainHandler != null && writesOutstanding <= lwm) {
  Handler<Void> handler = drainHandler;
  drainHandler = null;
  handler.handle(null);
 }
}

代码示例来源:origin: org.vert-x/vertx-core

void handleEnd() {
 if (endHandler != null) {
  endHandler.handle(null);
 }
}

代码示例来源:origin: org.vert-x/vertx-core

void handleException(Exception e) {
  if (exceptionHandler != null) {
   exceptionHandler.handle(e);
  }
 }
}

代码示例来源:origin: org.vert-x/vertx-core

void handleException(Exception e) {
 if (exceptionHandler != null) {
  exceptionHandler.handle(e);
 }
}

代码示例来源:origin: io.fabric8.ipaas.apps/fabric8mq

private void onFailure(Throwable error) {
  failed = true;
  Handler<Throwable> handler = plainExceptionHandler;
  if (handler != null) {
    handler.handle(error);
  }
}

代码示例来源:origin: org.vert-x/vertx-core

void handleException(Exception e) {
 if (exceptionHandler != null) {
  exceptionHandler.handle(e);
 }
}

代码示例来源:origin: org.vert-x/vertx-core

public void handle(WebSocketMatcher.Match match) {
  if (wsHandler != null) {
   wsHandler.handle(match.ws);
  }
 }
});

代码示例来源:origin: org.vert-x/vertx-core

void handleEnd() {
  if (endHandler != null) {
   checkContext();
   endHandler.handle(null);
  }
 }
};

代码示例来源:origin: org.vert-x/vertx-core

void writable() {
 if (drainHandler != null) {
  Handler<Void> dh = drainHandler;
  drainHandler = null;
  dh.handle(null);
 }
}

代码示例来源:origin: org.vert-x/vertx-core

void handleClosed() {
  cleanupHandlers();
  if (endHandler != null) {
   endHandler.handle(null);
  }
  if (closedHandler != null) {
   closedHandler.handle(null);
  }
 }
}

代码示例来源:origin: com.englishtown/vertx-mod-cassandra

private void runOnReadyCallbacks(AsyncResult<Void> result) {
  initResult = result;
  onReadyCallbacks.forEach(callback -> callback.handle(result));
  onReadyCallbacks.clear();
}

代码示例来源:origin: org.vert-x/vertx-core

public void handle(final WebSocketMatcher.Match match) {
  SockJSSocket sock = new RawWSSockJSSocket(vertx, match.ws);
  sockHandler.handle(sock);
 }
});

代码示例来源:origin: org.vert-x/vertx-core

public void run() {
  DefaultNetSocket sock = new DefaultNetSocket(vertx, ch, handler.context);
  socketMap.put(ch, sock);
  handler.handler.handle(sock);
 }
});

代码示例来源:origin: org.vert-x/vertx-core

void handleException(Exception e) {
 if (exceptionHandler != null) {
  checkContext();
  exceptionHandler.handle(e);
 } else {
  log.error("Unhandled exception", e);
 }
}

代码示例来源:origin: org.vert-x/vertx-core

public synchronized void close() {
 if (endHandler != null) {
  endHandler.handle(null);
 }
 closed = true;
 if (listener != null && handleCalled) {
  listener.sessionClosed();
 }
}

代码示例来源:origin: com.englishtown/vertx-mod-jersey

@Override
  public void handle(Void aVoid) {
    if (next >= requestProcessors.size()) {
      done.handle(null);
    } else {
      callVertxRequestProcessor(next, vertxRequest, jerseyRequest, done);
    }
  }
});

相关文章

Handler类方法