Package org.mule.api.lifecycle

Examples of org.mule.api.lifecycle.InitialisationException


    @Override
    public void initialise() throws InitialisationException
    {
        if (eventComparator == null)
        {
            throw new InitialisationException(CoreMessages.objectIsNull("eventComparator"), this);
        }
        super.initialise();
    }
View Full Code Here


    public void initialise() throws InitialisationException
    {
        if (algorithm == null)
        {
            throw new InitialisationException(CoreMessages.objectIsNull("Algorithm"), this);
        }
        else
        {
            logger.debug("Using encryption algorithm: " + algorithm);
        }

        keySpec = createKeySpec();

        try
        {
            secretKey = getSecretKey();
            // Create Ciphers
            encryptCipher = Cipher.getInstance(getAlgorithm());
            decryptCipher = Cipher.getInstance(getAlgorithm());

            AlgorithmParameterSpec paramSpec = createAlgorithmParameterSpec();
            if (paramSpec != null)
            {
                encryptCipher.init(Cipher.ENCRYPT_MODE, secretKey, paramSpec);
                decryptCipher.init(Cipher.DECRYPT_MODE, secretKey, paramSpec);
            }
            else
            {
                encryptCipher.init(Cipher.ENCRYPT_MODE, secretKey);
                decryptCipher.init(Cipher.DECRYPT_MODE, secretKey);
            }

        }
        catch (Exception e)
        {
            throw new InitialisationException(CoreMessages.failedToCreate("encryption ciphers"),
                e, this);
        }
    }
View Full Code Here

                rulesEngine.assertFact(this, obj);
            }
        }
        catch (Exception e)
        {
            throw new InitialisationException(e, this);
        }
    }
View Full Code Here

        {
            throw e;
        }
        catch (MuleException e)
        {
            throw new InitialisationException(e, this);
        }

    }
View Full Code Here

        {
            buildServiceMessageProcessorChain();
        }
        catch (MuleException e)
        {
            throw new InitialisationException(e, this);
        }
       
        // Wrap chain to decouple lifecycle
        messageSource.setListener(new AbstractInterceptingMessageProcessor()
        {
View Full Code Here

            securityManager = muleContext.getSecurityManager();
        }
       
        if (securityManager == null)
        {
            throw new InitialisationException(CoreMessages.authSecurityManagerNotSet(), this);
        }

        // This filter may only allow authentication on a subset of registered
        // security providers
        if (securityProviders != null)
        {
            SecurityManager localManager = new MuleSecurityManager();
            String[] securityProviders = StringUtils.splitAndTrim(this.securityProviders, ",");
            for (String sp : securityProviders)
            {
                SecurityProvider provider = securityManager.getProvider(sp);
                if (provider != null)
                {
                    localManager.addProvider(provider);
                }
                else
                {
                    throw new InitialisationException(
                            CoreMessages.objectNotRegistered(
                                    "Security Provider", sp), this);
                }
            }
            securityManager = localManager;
View Full Code Here

    public void initialise() throws InitialisationException
    {
        super.initialise();
        if(getReturnClass().equals(Object.class))
        {
            throw new InitialisationException(CoreMessages.transformerInvalidReturnType(Object.class, getName()), this);
        }
    }
View Full Code Here

            {
                bpms = muleContext.getRegistry().lookupObject(BPMS.class);
            }
            catch (Exception e)
            {
                throw new InitialisationException(e, this);
            }
        }
        if (bpms == null)
        {
            throw new InitialisationException(MessageFactory.createStaticMessage("The bpms property must be set for this component."), this);
        }
        if (bpms instanceof Initialisable)
        {
            ((Initialisable) bpms).initialise();
        }
View Full Code Here

        {
            createMessageProcessorChain();
        }
        catch (MuleException e)
        {
            throw new InitialisationException(e, this);
        }

        for (MessageProcessor processor : processors)
        {
            if (processor instanceof FlowConstructAware)
View Full Code Here

        {
            java.security.Security.addProvider(new BouncyCastleProvider());
        }
        catch (Exception e)
        {
            throw new InitialisationException(CoreMessages.failedToCreate("KeyBasedEncryptionStrategy"), e,
                this);
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.api.lifecycle.InitialisationException

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.