Examples of RemoteConnectionProviderFactory


Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

        // Note: The isValidUriScheme method name is a bit misleading. All it does is a check for already
        // registered connection providers for that URI scheme
        if (!endpoint.isValidUriScheme(REMOTE_URI_SCHEME)) {
            try {
                // TODO: Allow a way to pass the options
                endpoint.addConnectionProvider(REMOTE_URI_SCHEME, new RemoteConnectionProviderFactory(), OptionMap.EMPTY);
            } catch (IOException ioe) {
                throw new StartException("Could not register a connection provider factory for " + REMOTE_URI_SCHEME + " uri scheme", ioe);
            }
        }
    }
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

        final Endpoint endpoint;
        try {
            boolean ok = false;
            endpoint = Remoting.createEndpoint(endpointName, optionMap);
            try {
                endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.create(Options.SSL_ENABLED, Boolean.FALSE));
                ok = true;
            } finally {
                if (! ok) {
                    endpoint.closeAsync();
                }
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

    }

    private synchronized void createConnection() {
        try {
            endpoint = Remoting.createEndpoint("endpoint", OptionMap.EMPTY);
            endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.create(Options.SSL_ENABLED, Boolean.FALSE));

            // open a connection
            final IoFuture<Connection> futureConnection = endpoint.connect(new URI(hostUrl), OptionMap.create(Options.SASL_POLICY_NOANONYMOUS, Boolean.FALSE, Options.SASL_POLICY_NOPLAINTEXT, Boolean.FALSE), callbackHandler);
            connection = IoFutureHelper.get(futureConnection, 30L, TimeUnit.SECONDS);
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

        if (configuration.getEndpoint() != null) {
            endpoint = configuration.getEndpoint();
            return new ProtocolChannelClient(false, endpoint, null, configuration);
        } else {
            endpoint = Remoting.createEndpoint(configuration.getEndpointName(), configuration.getOptionMap());
            Registration providerRegistration = endpoint.addConnectionProvider(configuration.getUri().getScheme(), new RemoteConnectionProviderFactory(), OptionMap.EMPTY);
            return new ProtocolChannelClient(true, endpoint, providerRegistration, configuration);
        }
    }
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

        if (configuration.getEndpoint() != null) {
            endpoint = configuration.getEndpoint();
            return new ProtocolChannelClient(false, endpoint, null, configuration);
        } else {
            endpoint = Remoting.createEndpoint(configuration.getEndpointName(), configuration.getOptionMap());
            Registration providerRegistration = endpoint.addConnectionProvider(configuration.getUri().getScheme(), new RemoteConnectionProviderFactory(), OptionMap.EMPTY);
            return new ProtocolChannelClient(true, endpoint, providerRegistration, configuration);
        }
    }
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

        if (configuration.getEndpoint() != null) {
            endpoint = configuration.getEndpoint();
            return new ProtocolChannelClient<T>(false, endpoint, null, configuration.getUri(), configuration.getChannelFactory());
        } else {
            endpoint = Remoting.createEndpoint(configuration.getEndpointName(), configuration.getOptionMap());
            Registration providerRegistration = endpoint.addConnectionProvider(configuration.getUri().getScheme(), new RemoteConnectionProviderFactory(), OptionMap.create(Options.SSL_ENABLED, Boolean.FALSE));
            return new ProtocolChannelClient<T>(true, endpoint, providerRegistration, configuration.getUri(), configuration.getChannelFactory());
        }
    }
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

            @Override
            public void run() {
                try {
                    final Endpoint endpoint = Remoting.createEndpoint("endpoint", OptionMap.EMPTY);
                    endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.create(Options.SSL_ENABLED, Boolean.FALSE));

                    // open a connection
                    final IoFuture<Connection> futureConnection = endpoint.connect(new URI(hostUrl), OptionMap.create(Options.SASL_POLICY_NOANONYMOUS, Boolean.FALSE), new AnonymousCallbackHandler());
                    final Connection connection = IoFutureHelper.get(futureConnection, 5L, TimeUnit.SECONDS);
                    try {
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

    public synchronized void start(final StartContext context) throws StartException {
        try {
            endpoint = Remoting.createEndpoint("endpoint", executor.getValue(), optionMap);
            Xnio xnio = XnioUtil.getXnio();

            providerRegistration = endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(xnio), OptionMap.create(Options.SSL_ENABLED, false));

        } catch (Exception e) {
            throw new StartException("Failed to start service", e);
        }
    }
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

            return (Connection) env.get(Connection.class.getName());
        }

        final Xnio xnio = Xnio.getInstance();
        endpoint = Remoting.createEndpoint("endpoint", xnio, OptionMap.create(Options.THREAD_DAEMON, true));
        endpoint.addConnectionProvider(CONNECTION_PROVIDER_URI, new RemoteConnectionProviderFactory(), OptionMap.EMPTY);

        // The credentials.
        CallbackHandler handler = null;
        boolean disableLocalAuth = true;
        if (env != null) {
View Full Code Here

Examples of org.jboss.remoting3.remote.RemoteConnectionProviderFactory

        this.serviceUrl = serviceURL;
        this.environment = Collections.unmodifiableMap(environment);

        final Xnio xnio = Xnio.getInstance();
        endpoint = Remoting.createEndpoint("endpoint", xnio, OptionMap.EMPTY);
        registration = endpoint.addConnectionProvider(CONNECTION_PROVIDER_URI, new RemoteConnectionProviderFactory(),
                OptionMap.EMPTY);
    }
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.