Package org.jboss.as.protocol.mgmt

Examples of org.jboss.as.protocol.mgmt.ManagementChannel$ResponseReceiver


        });
    }

    @Override
    public synchronized ProxyController popChannelAndCreateProxy(final String hostName) {
        ManagementChannel channel = unregisteredHostChannels.remove(hostName);
        if (channel == null) {
            throw new IllegalArgumentException("No channel for host " + hostName);
        }
        channel.addCloseHandler(new CloseHandler<Channel>() {
            public void handleClose(final Channel closed, final IOException exception) {
                unregisterRemoteHost(hostName);
            }
        });
        final PathAddress addr = PathAddress.pathAddress(PathElement.pathElement(ModelDescriptionConstants.HOST, hostName));
View Full Code Here


            }

            client.connect(handler);
            this.channelClient = client;

            ManagementChannel channel = client.openChannel(ManagementRemotingServices.DOMAIN_CHANNEL);
            this.channel = channel;

            channel.addCloseHandler(new CloseHandler<Channel>() {
                public void handleClose(final Channel closed, final IOException exception) {
                    connectionClosed();
                }
            });

            channel.startReceiving();

            masterProxy = new ExistingChannelModelControllerClient(channel);
        } catch (IOException e) {
            log.warnf("Could not connect to remote domain controller %s:%d", host.getHostAddress(), port);
            throw new IllegalStateException(e);
View Full Code Here

            }

            client.connect(handler);
            this.channelClient = client;

            ManagementChannel channel = client.openChannel(RemotingServices.DOMAIN_CHANNEL);
            this.channel = channel;

            channel.addCloseHandler(new CloseHandler<Channel>() {
                public void handleClose(final Channel closed, final IOException exception) {
                    connectionClosed();
                }
            });

            channel.startReceiving();

            masterProxy = new ExistingChannelModelControllerClient(channel);
        } catch (IOException e) {
            log.warnf("Could not connect to remote domain controller %s:%d", host.getHostAddress(), port);
            throw new IllegalStateException(e);
View Full Code Here

        });
    }

    @Override
    public synchronized ProxyController popChannelAndCreateProxy(final String hostName) {
        ManagementChannel channel = unregisteredHostChannels.remove(hostName);
        if (channel == null) {
            throw new IllegalArgumentException("No channel for host " + hostName);
        }
        channel.addCloseHandler(new CloseHandler<Channel>() {
            //This does not get called when slave terminates abruptly - see REM3-121
            public void handleClose(final Channel closed, final IOException exception) {
                //TODO A bit strange doing it here before the proxy is actually registered
                unregisterRemoteHost(hostName);
            }
View Full Code Here

            }

            client.connect(handler);
            this.channelClient = client;

            ManagementChannel channel = client.openChannel(RemotingServices.DOMAIN_CHANNEL);
            this.channel = channel;

            channel.addCloseHandler(new CloseHandler<Channel>() {
                public void handleClose(final Channel closed, final IOException exception) {
                    connectionClosed();
                }
            });

            channel.startReceiving();

            masterProxy = new ExistingChannelModelControllerClient(channel);
        } catch (IOException e) {
            log.warnf("Could not connect to remote domain controller %s:%d", host.getHostAddress(), port);
            throw new IllegalStateException(e);
View Full Code Here

        });
    }

    @Override
    public synchronized ProxyController popChannelAndCreateProxy(final String hostName) {
        ManagementChannel channel = unregisteredHostChannels.remove(hostName);
        if (channel == null) {
            throw new IllegalArgumentException("No channel for host " + hostName);
        }
        channel.addCloseHandler(new CloseHandler<Channel>() {
            //This does not get called when slave terminates abruptly - see REM3-121
            public void handleClose(final Channel closed, final IOException exception) {
                //TODO A bit strange doing it here before the proxy is actually registered
                unregisterRemoteHost(hostName);
            }
View Full Code Here

    }

    @Override
    protected ManagementChannel createChannel(Channel channel) {
        final ManagementOperationHandler handler = operationHandlerFactoryValue.getValue().createOperationHandler();
        final ManagementChannel managementChannel = new ManagementChannelFactory(handler).create(channelName, channel);
        log.tracef("Opened %s: %s with handler %s", channelName, managementChannel, handler);
        managementChannel.startReceiving();
        channel.addCloseHandler(new CloseHandler<Channel>() {
            public void handleClose(final Channel closed, final IOException exception) {
                try {
                    managementChannel.sendByeBye();
                } catch (IOException ignore) {
                }
                log.tracef("Handling close for %s", managementChannel);
            }
        });
View Full Code Here

    }

    @Override
    public void channelOpened(Channel channel) {
        final ManagementOperationHandler handler = operationHandlerFactoryValue.getValue().createOperationHandler();
        final ManagementChannel managementChannel = new ManagementChannelFactory(handler).create(channelName, channel);
        channels.add(managementChannel);
        log.tracef("Opened %s: %s with handler %s", channelName, managementChannel, handler);
        managementChannel.startReceiving();
        channel.addCloseHandler(new CloseHandler<Channel>() {
            public void handleClose(final Channel closed, final IOException exception) {
                channels.remove(managementChannel);
                try {
                    managementChannel.sendByeBye();
                } catch (IOException ignore) {
                }
                log.tracef("Handling close for %s", managementChannel);
            }
        });
View Full Code Here

TOP

Related Classes of org.jboss.as.protocol.mgmt.ManagementChannel$ResponseReceiver

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.