void handleData(Buffer buffer) { if (dataHandler != null) { checkContext(); dataHandler.handle(buffer); } }
private void callDoneHandler(Handler<String> doneHandler, String deploymentID) { if (doneHandler != null) { doneHandler.handle(deploymentID); } }
void handleEnd() { if (endHandler != null) { endHandler.handle(null); } }
private void runOnReadyCallbacks(AsyncResult<Void> result) { initResult = result; onReadyCallbacks.forEach(callback -> callback.handle(result)); onReadyCallbacks.clear(); }
public void handle(final WebSocketMatcher.Match match) { SockJSSocket sock = new RawWSSockJSSocket(vertx, match.ws); sockHandler.handle(sock); } });
public void run() { DefaultNetSocket sock = new DefaultNetSocket(vertx, ch, handler.context); socketMap.put(ch, sock); handler.handler.handle(sock); } });
void handleException(Exception e) { if (exceptionHandler != null) { checkContext(); exceptionHandler.handle(e); } else { log.error("Unhandled exception", e); } }
public synchronized void close() { if (endHandler != null) { endHandler.handle(null); } closed = true; if (listener != null && handleCalled) { listener.sessionClosed(); } }
@Override public void handle(Void aVoid) { if (next >= requestProcessors.size()) { done.handle(null); } else { callVertxRequestProcessor(next, vertxRequest, jerseyRequest, done); } } });
public void run() { ModuleIdentifier modID = new ModuleIdentifier(moduleName); // Validates it doPullInDependencies(modRoot, modID); doneHandler.handle(new DefaultFutureResult<>((Void) null)); } }, wrapped);
public void run() { ModuleIdentifier modID = new ModuleIdentifier(moduleName); // Validates it doMakeFatJar(modRoot, modID, directory); doneHandler.handle(new DefaultFutureResult<>((Void) null)); } }, wrapped);
public void run() { ModuleIdentifier modID = new ModuleIdentifier(moduleName); // Validates it doCreateModuleLink(modRoot, modID); doneHandler.handle(new DefaultFutureResult<>((Void) null)); } }, wrapped);
public void run() { ModuleIdentifier modID = new ModuleIdentifier(moduleName); doInstallMod(modID); doneHandler.handle(new DefaultFutureResult<>((Void) null)); } }, wrapped);
@Override protected void doStop(ServiceStopper serviceStopper) throws Exception { Handler<Void> handler = stopHandler; if (handler != null) { handler.handle(null); } serviceStopper.stop(writeStream); serviceStopper.stop(readStream); }
@Override protected void doStop(ServiceStopper serviceStopper) throws Exception { Handler<Void> handler = stopHandler; if (handler != null) { handler.handle(null); } serviceStopper.stop(writeStream); serviceStopper.stop(readStream); }
private void callDrainHandler() { if (drainHandler != null) { if (!writeQueueFull()) { try { drainHandler.handle(null); } catch (Throwable t) { transport.handleHandlerException(t); } } } }
@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); } }
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);