本文整理了Java中org.vertx.java.core.Handler
类的一些代码示例,展示了Handler
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Handler
类的具体详情如下:
包路径:org.vertx.java.core.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);
}
}
});
内容来源于网络,如有侵权,请联系作者删除!