Package org.jboss.as.domain.management

Examples of org.jboss.as.domain.management.CallbackHandlerFactory


            throw new RuntimeException(e);
        }

        try {
            CallbackHandler handler = null;
            CallbackHandlerFactory handlerFactory = callbackFactoryInjector.getOptionalValue();
            if (handlerFactory != null) {
                handler = handlerFactory.getCallbackHandler(name);
            }

            client.connect(handler);
            this.channelClient = client;
View Full Code Here


            final ProtocolChannelClient client = ProtocolChannelClient.create(configuration);
            CallbackHandler callbackHandler = null;
            SSLContext sslContext = null;
            if (realm != null) {
                sslContext = realm.getSSLContext();
                CallbackHandlerFactory handlerFactory = realm.getSecretCallbackHandlerFactory();
                if (handlerFactory != null) {
                    callbackHandler = handlerFactory.getCallbackHandler(localHostName);
                }
            }
            // Connect
            connection = client.connectSync(callbackHandler, Collections.<String, String> emptyMap(), sslContext);
            connection.addCloseHandler(new CloseHandler<Connection>() {
View Full Code Here

            final ServiceController<SecurityRealm> securityRealmController = (ServiceController<SecurityRealm>) this.serviceRegistry.getService(securityRealmServiceName);
            if (securityRealmController == null) {
                return new AnonymousCallbackHandler();
            }
            final SecurityRealm securityRealm = securityRealmController.getValue();
            final CallbackHandlerFactory cbhFactory;
            if (securityRealm != null && (cbhFactory = securityRealm.getSecretCallbackHandlerFactory()) != null && this.userName != null) {
                return cbhFactory.getCallbackHandler(this.userName);
            } else {
                return new AnonymousCallbackHandler();
            }
        }
View Full Code Here

            final ProtocolChannelClient client = ProtocolChannelClient.create(configuration);
            CallbackHandler callbackHandler = null;
            SSLContext sslContext = null;
            if (realm != null) {
                sslContext = realm.getSSLContext();
                CallbackHandlerFactory handlerFactory = realm.getSecretCallbackHandlerFactory();
                if (handlerFactory != null) {
                    callbackHandler = handlerFactory.getCallbackHandler(localHostName);
                }
            }
            // Connect
            connection = client.connectSync(callbackHandler, Collections.<String, String> emptyMap(), sslContext);
            connection.addCloseHandler(new CloseHandler<Connection>() {
View Full Code Here

            throw MESSAGES.couldNotConnect(e);
        }
        final Endpoint endpoint = this.endpointInjectedValue.getValue();

        final CallbackHandler callbackHandler;
        final CallbackHandlerFactory cbhFactory;
        SSLContext sslContext = null;
        SecurityRealm realm = securityRealmInjectedValue.getOptionalValue();
        if (realm != null && (cbhFactory = realm.getSecretCallbackHandlerFactory()) != null && username != null) {
            callbackHandler = cbhFactory.getCallbackHandler(username);
        } else {
            callbackHandler = getCallbackHandler();
        }

        if (realm != null) {
View Full Code Here

            final ServiceController<SecurityRealm> securityRealmController = (ServiceController<SecurityRealm>) this.serviceRegistry.getService(securityRealmServiceName);
            if (securityRealmController == null) {
                return new AnonymousCallbackHandler();
            }
            final SecurityRealm securityRealm = securityRealmController.getValue();
            final CallbackHandlerFactory cbhFactory;
            if (securityRealm != null && (cbhFactory = securityRealm.getSecretCallbackHandlerFactory()) != null && this.userName != null) {
                return cbhFactory.getCallbackHandler(this.userName);
            } else {
                return new AnonymousCallbackHandler();
            }
        }
View Full Code Here

        password = new String(value).toCharArray();
    }


    public void start(StartContext startContext) throws StartException {
        factory = new CallbackHandlerFactory() {
            public CallbackHandler getCallbackHandler(String username) {
                return new SecretCallbackHandler(username);
            }
        };
    }
View Full Code Here

            throw new RuntimeException(e);
        }

        try {
            CallbackHandler handler = null;
            CallbackHandlerFactory handlerFactory = callbackFactoryInjector.getOptionalValue();
            if (handlerFactory != null) {
                handler = handlerFactory.getCallbackHandler(name);
            }

            client.connect(handler);
            this.channelClient = client;
View Full Code Here

            thePassword = trimmedPassword.toCharArray();
        } else {
            thePassword = password.toCharArray();
        }

        factory = new CallbackHandlerFactory() {
            public CallbackHandler getCallbackHandler(String username) {
                return new SecretCallbackHandler(username, thePassword);
            }
        };
    }
View Full Code Here

            final ServiceController<SecurityRealm> securityRealmController = (ServiceController<SecurityRealm>) this.serviceRegistry.getService(this.securityRealmServiceName);
            if (securityRealmController == null) {
                return new AnonymousCallbackHandler();
            }
            final SecurityRealm securityRealm = securityRealmController.getValue();
            final CallbackHandlerFactory cbhFactory;
            if (securityRealm != null && (cbhFactory = securityRealm.getSecretCallbackHandlerFactory()) != null && this.userName != null) {
                return cbhFactory.getCallbackHandler(this.userName);
            } else {
                return new AnonymousCallbackHandler();
            }
        }
View Full Code Here

TOP

Related Classes of org.jboss.as.domain.management.CallbackHandlerFactory

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.