org.vertx.java.core.Handler.handle()方法的使用及代码示例

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

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

Handler.handle介绍

暂无

代码示例

代码示例来源: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 handleEnd() {
 if (endHandler != null) {
  endHandler.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);
    }
  }
});

代码示例来源:origin: io.vertx/vertx-platform

public void run() {
  ModuleIdentifier modID = new ModuleIdentifier(moduleName); // Validates it
  doPullInDependencies(modRoot, modID);
  doneHandler.handle(new DefaultFutureResult<>((Void) null));
 }
}, wrapped);

代码示例来源:origin: io.vertx/vertx-platform

public void run() {
  ModuleIdentifier modID = new ModuleIdentifier(moduleName); // Validates it
  doMakeFatJar(modRoot, modID, directory);
  doneHandler.handle(new DefaultFutureResult<>((Void) null));
 }
}, wrapped);

代码示例来源:origin: io.vertx/vertx-platform

public void run() {
  ModuleIdentifier modID = new ModuleIdentifier(moduleName); // Validates it
  doCreateModuleLink(modRoot, modID);
  doneHandler.handle(new DefaultFutureResult<>((Void) null));
 }
}, wrapped);

代码示例来源:origin: io.vertx/vertx-platform

public void run() {
  ModuleIdentifier modID = new ModuleIdentifier(moduleName);
  doInstallMod(modID);
  doneHandler.handle(new DefaultFutureResult<>((Void) null));
 }
}, wrapped);

代码示例来源:origin: io.vertx/vertx-platform

@Override
 public void handle(AsyncResult<Void> res) {
  if (res.failed()) {
   doneHandler.handle(new DefaultFutureResult<String>(res.cause()));
  } else {
   doneHandler.handle(new DefaultFutureResult<>(deploymentID));
  }
 }
});

代码示例来源:origin: io.fabric8.jube.images.fabric8/fabric8-mq

@Override
protected void doStop(ServiceStopper serviceStopper) throws Exception {
  Handler<Void> handler = stopHandler;
  if (handler != null) {
    handler.handle(null);
  }
  serviceStopper.stop(writeStream);
  serviceStopper.stop(readStream);
}

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

@Override
protected void doStop(ServiceStopper serviceStopper) throws Exception {
  Handler<Void> handler = stopHandler;
  if (handler != null) {
    handler.handle(null);
  }
  serviceStopper.stop(writeStream);
  serviceStopper.stop(readStream);
}

代码示例来源:origin: io.fabric8.jube.images.fabric8/fabric8-mq

private void callDrainHandler() {
  if (drainHandler != null) {
    if (!writeQueueFull()) {
      try {
        drainHandler.handle(null);
      } catch (Throwable t) {
        transport.handleHandlerException(t);
      }
    }
  }
}

代码示例来源:origin: io.vertx/vertx-platform

@Override
public void exit() {
 // We tell the cluster manager to leave - this is because Hazelcast uses non daemon threads which will prevent
 // JVM exit and shutdown hooks to be called
 ClusterManager mgr = vertx.clusterManager();
 if (mgr != null) {
  vertx.clusterManager().leave();
 }
 if (exitHandler != null) {
  exitHandler.handle(null);
 }
}

代码示例来源:origin: io.vertx/vertx-platform

public void run() {
  ModuleIdentifier modID = new ModuleIdentifier(moduleName); // Validates it
  File modDir = new File(modRoot, modID.toString());
  if (!modDir.exists()) {
   throw new PlatformManagerException("Cannot find module to uninstall: " + moduleName);
  } else {
   vertx.fileSystem().deleteSync(modDir.getAbsolutePath(), true);
  }
  doneHandler.handle(new DefaultFutureResult<>((Void) null));
 }
}, wrapped);

相关文章