Examples of awaitCompletion()


Examples of org.jboss.as.protocol.mgmt.ManagementChannelHandler.awaitCompletion()

        channel.addCloseHandler(new CloseHandler<Channel>() {
            @Override
            public void handleClose(Channel closed, IOException exception) {
                handler.shutdown();
                try {
                    handler.awaitCompletion(1, TimeUnit.SECONDS);
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
                } finally {
                    handler.shutdownNow();
                }
View Full Code Here

Examples of org.jboss.as.protocol.mgmt.ManagementMessageHandler.awaitCompletion()

    public synchronized void stop(StopContext context) {
        final ManagementMessageHandler handler = this.handler;
        if(handler != null) {
            handler.shutdown();
            try {
                if(! handler.awaitCompletion(100, TimeUnit.MILLISECONDS)) {
                    ControllerLogger.ROOT_LOGGER.debugf("HostController server client did not complete shutdown within timeout");
                }
            } catch (Exception e) {
                ControllerLogger.ROOT_LOGGER.warnf(e , "service shutdown did not complete");
            } finally {
View Full Code Here

Examples of org.jboss.as.protocol.mgmt.ManagementMessageHandler.awaitCompletion()

        Channel.Key key = channel.addCloseHandler(new CloseHandler<Channel>() {
            @Override
            public void handleClose(Channel closed, IOException exception) {
                handler.shutdown();
                try {
                    handler.awaitCompletion(100, TimeUnit.MILLISECONDS);
                } catch (Exception e) {
                    ControllerLogger.ROOT_LOGGER.warnf(e , "service shutdown did not complete");
                } finally {
                    handler.shutdownNow();
                }
View Full Code Here

Examples of org.jboss.as.protocol.mgmt.support.SimpleHandlers.SimpleClient.awaitCompletion()

        };
        final AsyncFuture<Integer> future = client.execute(request);
        final AsyncFuture.Status completed = future.await(1, TimeUnit.SECONDS);
        Assert.assertEquals(completed, AsyncFuture.Status.WAITING);
        client.shutdown();
        boolean done = client.awaitCompletion(1, TimeUnit.SECONDS);
        Assert.assertFalse(done);
        latch.countDown();
        done = client.awaitCompletion(2, TimeUnit.SECONDS);
        Assert.assertTrue(done);
    }
View Full Code Here

Examples of org.jboss.as.protocol.mgmt.support.SimpleHandlers.SimpleClient.awaitCompletion()

        Assert.assertEquals(completed, AsyncFuture.Status.WAITING);
        client.shutdown();
        boolean done = client.awaitCompletion(1, TimeUnit.SECONDS);
        Assert.assertFalse(done);
        latch.countDown();
        done = client.awaitCompletion(2, TimeUnit.SECONDS);
        Assert.assertTrue(done);
    }

}
View Full Code Here

Examples of org.jgroups.auth.sasl.SaslServerContext.awaitCompletion()

            SaslServerContext ctx = null;
            try {
                ctx = new SaslServerContext(saslServerFactory, mech, server_name != null ? server_name : local_addr.toString(), server_callback_handler, sasl_props, server_subject);
                sasl_context.put(remoteAddress, ctx);
                this.getDownProtocol().down(new Event(Event.MSG, ctx.nextMessage(remoteAddress, saslHeader)));
                ctx.awaitCompletion(timeout);
                if (ctx.isSuccessful()) {
                    if (log.isDebugEnabled()) {
                        log.debug("Authentication successful for %s", ctx.getAuthorizationID());
                    }
                    return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.