Package org.jvnet.hk2.config

Examples of org.jvnet.hk2.config.ObservableBean.addListener()


        _embedded.addConnector(jkConnector);

        ObservableBean httpListenerBean = (ObservableBean) ConfigSupport.getImpl(
                listener);
        httpListenerBean.addListener(configListener);

        return jkConnector;

    }
View Full Code Here


        // Add Host to Engine
        engine.addChild(vs);

        ObservableBean virtualServerBean = (ObservableBean) ConfigSupport.getImpl(vsBean);
        virtualServerBean.addListener(configListener);

        return vs;
    }

View Full Code Here

    @Override
    public void postConstruct() {
        NetworkConfig networkConfig = config.getNetworkConfig();
        configListener = new DynamicConfigListener(config, logger);
        ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(networkConfig.getNetworkListeners());
        bean.addListener(configListener);
        bean = (ObservableBean) ConfigSupport.getImpl(config.getHttpService());
        bean.addListener(configListener);
        transactions.addListenerForType(SystemProperty.class, configListener);
        configListener.setGrizzlyService(this);
View Full Code Here

        NetworkConfig networkConfig = config.getNetworkConfig();
        configListener = new DynamicConfigListener(config, logger);
        ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(networkConfig.getNetworkListeners());
        bean.addListener(configListener);
        bean = (ObservableBean) ConfigSupport.getImpl(config.getHttpService());
        bean.addListener(configListener);
        transactions.addListenerForType(SystemProperty.class, configListener);
        configListener.setGrizzlyService(this);

        try {
            boolean isAtLeastOneProxyStarted = false;
View Full Code Here

        ObservableBean bean = null;
        if(_logger.isLoggable(Level.FINEST)){
            debug("adding listener : " + instance);
        }
        bean = (ObservableBean) ConfigSupport.getImpl((ConfigBeanProxy)instance);
        bean.addListener(this);
    }

    /**
     * Remove listener from all resources - JDBC Connection Pools/JDBC Resources/
     * Connector Connection Pools/ Connector Resources.
View Full Code Here

        logger.fine(adminStrings.getLocalString("jobcleanup.service.init", "Initializing Job Cleanup service"));

        managedJobConfig = domain.getExtensionByType(ManagedJobConfig.class);
        ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(managedJobConfig);
        logger.fine(adminStrings.getLocalString("init.managed.config.bean", "Initializing ManagedJobConfig bean"));
        bean.addListener(this);


        scheduler = Executors.newScheduledThreadPool(10, new ThreadFactory() {
            @Override
            public Thread newThread(Runnable r) {
View Full Code Here

    @Override
    public void postConstruct() {
        NetworkConfig networkConfig = config.getNetworkConfig();
        configListener = new DynamicConfigListener(config, logger);
        ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(networkConfig.getNetworkListeners());
        bean.addListener(configListener);
        bean = (ObservableBean) ConfigSupport.getImpl(config.getHttpService());
        bean.addListener(configListener);
        transactions.addListenerForType(SystemProperty.class, configListener);
        configListener.setGrizzlyService(this);
View Full Code Here

        NetworkConfig networkConfig = config.getNetworkConfig();
        configListener = new DynamicConfigListener(config, logger);
        ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(networkConfig.getNetworkListeners());
        bean.addListener(configListener);
        bean = (ObservableBean) ConfigSupport.getImpl(config.getHttpService());
        bean.addListener(configListener);
        transactions.addListenerForType(SystemProperty.class, configListener);
        configListener.setGrizzlyService(this);

        try {
            boolean isAtLeastOneProxyStarted = false;
View Full Code Here

        logger.log(Level.FINE,KernelLoggerInfo.initializingJobCleanup);

        managedJobConfig = domain.getExtensionByType(ManagedJobConfig.class);
        ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(managedJobConfig);
        logger.fine(KernelLoggerInfo.initializingManagedConfigBean);
        bean.addListener(this);


        scheduler = Executors.newScheduledThreadPool(10, new ThreadFactory() {
            @Override
            public Thread newThread(Runnable r) {
View Full Code Here

        if (isStartNeeded) {
            startWebContainer();
        } else {
            ObservableBean bean = (ObservableBean) ConfigSupport.getImpl(serverConfig.getHttpService());
            bean.addListener(this);
            bean = (ObservableBean) ConfigSupport.getImpl(serverConfig.getNetworkConfig().getNetworkListeners());
            bean.addListener(this);
        }
    }
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.