Package org.jboss.as.protocol

Examples of org.jboss.as.protocol.ProtocolChannelClient$AnonymousCallbackHandler


                endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.EMPTY);

                configuration.setEndpoint(endpoint);
                configuration.setEndpointName("management-client");

                final ProtocolChannelClient setup = ProtocolChannelClient.create(configuration);
                strategy = ManagementClientChannelStrategy.create(setup, channelAssociation, clientConfiguration.getCallbackHandler(),
                        clientConfiguration.getSaslOptions(), clientConfiguration.getSSLContext(),
                        new CloseHandler<Channel>() {
                    @Override
                    public void handleClose(final Channel closed, final IOException exception) {
View Full Code Here


                endpoint = Remoting.createEndpoint("management-client", OptionMap.EMPTY);
                endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.EMPTY);

                configuration.setEndpoint(endpoint);

                final ProtocolChannelClient setup = ProtocolChannelClient.create(configuration);
                strategy = ManagementClientChannelStrategy.create(setup, channelAssociation, clientConfiguration.getCallbackHandler(),
                        clientConfiguration.getSaslOptions(), clientConfiguration.getSSLContext(),
                        new CloseHandler<Channel>() {
                    @Override
                    public void handleClose(final Channel closed, final IOException exception) {
View Full Code Here

    }

    protected synchronized Channel getOrCreateChannel() throws IOException {
        if (strategy == null) {

            final ProtocolChannelClient setup = ProtocolChannelClient.create(channelConfig);
            strategy = ManagementClientChannelStrategy.create(setup, channelAssociation, handler, null, sslContext,
                    new CloseHandler<Channel>() {
                @Override
                public void handleClose(final Channel closed, final IOException exception) {
                    channelAssociation.handleChannelClosed(closed, exception);
View Full Code Here

     */
    private synchronized void openChannel(final CallbackHandler callbackHandler) throws IOException {
        boolean ok = false;
        try {
            // Connect
            final ProtocolChannelClient client = ProtocolChannelClient.create(configuration);
            connection = client.connectSync(callbackHandler, null, getAcceptingSSLContext());
            connection.addCloseHandler(new CloseHandler<Connection>() {
                @Override
                public void handleClose(final Connection closed, final IOException exception) {
                    synchronized (this) {
                        if(connection == closed) {
View Full Code Here

//            this.channelClient.close();
//            this.channelClient = null;
//        }

        // txOperationHandler = new TransactionalModelControllerOperationHandler(executor, controller);
        ProtocolChannelClient client;
        ProtocolChannelClient.Configuration configuration = new ProtocolChannelClient.Configuration();
        //Reusing the endpoint here after a disconnect does not seem to work once something has gone down, so try our own
        //configuration.setEndpoint(endpointInjector.getValue());
        configuration.setEndpointName("endpoint");
        configuration.setUriScheme("remote");

        this.handler = new TransactionalModelControllerOperationHandler(controller, executor);
        final Connection connection;
        try {
            configuration.setUri(new URI("remote://" + host.getHostAddress() + ":" + port));
            client = ProtocolChannelClient.create(configuration);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

        try {
            CallbackHandler handler = null;
            CallbackHandlerFactory handlerFactory = callbackFactoryInjector.getOptionalValue();
            if (handlerFactory != null) {
                handler = handlerFactory.getCallbackHandler(name);
            }
            connection = client.connectSync(handler);
            this.channelClient = client;

            channel = connection.openChannel(ManagementRemotingServices.DOMAIN_CHANNEL, OptionMap.EMPTY).get();
            channel.addCloseHandler(new CloseHandler<Channel>() {
                public void handleClose(final Channel closed, final IOException exception) {
View Full Code Here

TOP

Related Classes of org.jboss.as.protocol.ProtocolChannelClient$AnonymousCallbackHandler

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.