@Override public synchronized void close() { if (writeFuture != null) { // Close after all data is written writeFuture.addListener(ChannelFutureListener.CLOSE); channel.flush(); } else { super.close(); } }
protected void initializeComponents() { super.initializeComponents(); // serviceLock = new Object(); pendingQueue = new LinkedBlockingQueue<PendingRequest>(); processor = new RequestProcessor(); processerThread = new Thread(processor, "request-processor"); processerThread.start(); }
@Override protected synchronized void handleClosed() { checkContext(); if (endHandler != null) { endHandler.handle(null); } super.handleClosed(); if (vertx.eventBus() != null) { registration.unregister(); } }