Package de.novanic.eventservice.client.config

Examples of de.novanic.eventservice.client.config.ConfigurationException


        public boolean isAvailable() {
            return true;
        }

        public EventServiceConfiguration load() {
            throw new ConfigurationException("testException");
        }
View Full Code Here


     * @return the previous generated connection / client id for the specific client
     */
    public String getConnectionId(HttpServletRequest aRequest) {
        final String theConnectionId = aRequest.getParameter("id");
        if(theConnectionId == null) {
            throw new ConfigurationException("A client id was requested without generating a connection id first or the connection id was not transferred with the request!");
        }
        return theConnectionId;
    }
View Full Code Here

     */
    public UserManager getUserManager() {
        if(myUserManager != null) {
            return myUserManager;
        }
        throw new ConfigurationException("The UserManager isn't configured! It is necessary to create an instance of " +
                "UserManager first. That can be done by calling a factory method of UserManagerFactory with a configuration.");
    }
View Full Code Here

        final String theParameterValue = readParameterValue(aConfigParameter);
        if(isParameterValueDefined(theParameterValue)) {
            try {
                return StringUtil.readInteger(theParameterValue);
            } catch(ServiceUtilException e) {
                throw new ConfigurationException("The value of the parameter \"" + aConfigParameter.declaration()
                        + "\" was expected to be numeric, but was \"" + theParameterValue + "\"!", e);
            }
        }
        return null;
    }
View Full Code Here

        if(thePropertiesInputStream != null) {
            try {
                myProperties = new Properties();
                myProperties.load(thePropertiesInputStream);
            } catch(IOException e) {
                throw new ConfigurationException("Error on loading \"" + myPropertyName + "\"!", e);
            } finally {
                try {
                    thePropertiesInputStream.close();
                } catch(IOException e) {
                    LOG.error("Error on closing stream of \"" + myPropertyName + "\"!", e);
View Full Code Here

                    return enrich(theConfigLoader.load());
                }
            }
        }
        //can not occur, because the DefaultConfigurationLoader is attached and always available
        throw new ConfigurationException("No configuration is available!");
    }
View Full Code Here

     * with a configuration at first.
     * @return {@link de.novanic.eventservice.config.ConfigurationDependentFactory} (singleton)
     */
    public static ConfigurationDependentFactory getInstance(EventServiceConfiguration aConfiguration) {
        if(aConfiguration == null) {
            throw new ConfigurationException(ConfigurationDependentFactory.class.getName() + " was initialized without a configuration!");
        }
        if(myConfiguration == null) {
            myConfiguration = aConfiguration;
        }
        return ConfigurationDependentFactoryHolder.INSTANCE;
View Full Code Here

     * be used at first.
     * @return {@link de.novanic.eventservice.config.ConfigurationDependentFactory} (singleton)
     */
    public static ConfigurationDependentFactory getInstance() {
        if(myConfiguration == null) {
            throw new ConfigurationException(ConfigurationDependentFactory.class.getName() + " has to be initialized with a configuration before!");
        }
        return ConfigurationDependentFactoryHolder.INSTANCE;
    }
View Full Code Here

            synchronized(this) {
                if(myConnectionIdGenerator == null) {
                    try {
                        myConnectionIdGenerator = createObject(myConfiguration.getConnectionIdGeneratorClassName());
                    } catch(ClassCastException e) {
                        throw new ConfigurationException(myConfiguration.getConnectionIdGeneratorClassName() + " should have another type!", e);
                    }
                }
            }
        }
        return myConnectionIdGenerator;
View Full Code Here

            synchronized(this) {
                if(myConnectionStrategyServerConnector == null) {
                    try {
                        myConnectionStrategyServerConnector = createObject(myConfiguration.getConnectionStrategyServerConnectorClassName());
                    } catch(ClassCastException e) {
                        throw new ConfigurationException(myConfiguration.getConnectionStrategyServerConnectorClassName() + " should have another type!", e);
                    }
                }
            }
        }
        return myConnectionStrategyServerConnector;
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.client.config.ConfigurationException

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.