Package org.jboss.as.protocol.mgmt

Examples of org.jboss.as.protocol.mgmt.ManagementMessageHandler


        channel.receiveMessage(ManagementChannelReceiver.createDelegating(handler));
    }

    /** {@inheritDoc} */
    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 {
                handler.shutdownNow();
            }
        }
    }
View Full Code Here


*/
public class ModelControllerClientOperationHandlerFactoryService extends AbstractModelControllerOperationHandlerFactoryService {

    @Override
    public synchronized HandleableCloseable.Key startReceiving(Channel channel) {
        final ManagementMessageHandler handler = new ModelControllerClientOperationHandler(getController(), getExecutor());
        final Channel.Receiver receiver = ManagementChannelReceiver.createDelegating(handler);
        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();
                }
            }
        });
        channel.receiveMessage(receiver);
        return key;
View Full Code Here

TOP

Related Classes of org.jboss.as.protocol.mgmt.ManagementMessageHandler

Copyright © 2018 www.massapicom. 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.