Package org.mule.config.i18n

Examples of org.mule.config.i18n.Message


     *
     * @param e the exception that caused the shutdown
     */
    void shutdown(Throwable e)
    {
        Message msg = new Message(Messages.FATAL_ERROR_WHILE_RUNNING);
        UMOException muleException = ExceptionHelper.getRootMuleException(e);
        if (muleException != null) {
            logger.fatal(muleException.getDetailedMessage());
        } else {
            logger.fatal(msg.toString() + " " + e.getMessage(), e);
        }
        List msgs = new ArrayList();
        msgs.add(msg.getMessage());
        Throwable root = ExceptionHelper.getRootException(e);
        msgs.add(root.getMessage() + " (" + root.getClass().getName() + ")");
        msgs.add(" ");
        msgs.add(new Message(Messages.FATAL_ERROR_SHUTDOWN));
        msgs.add(new Message(Messages.SERVER_STARTED_AT_X, new Date(MuleManager.getInstance().getStartDate())));
        msgs.add(new Message(Messages.SERVER_SHUTDOWN_AT_X, new Date().toString()));

        shutdownMessage = StringMessageHelper.getBoilerPlate(msgs, '*', 80);
        logger.fatal(shutdownMessage);
        System.exit(0);
    }
View Full Code Here


     */
    void shutdown()
    {
        logger.info("Mule JBI server shutting dow due to normal shutdown request");
        List msgs = new ArrayList();
        msgs.add(new Message(Messages.NORMAL_SHUTDOWN).getMessage());
        msgs.add(new Message(Messages.SERVER_STARTED_AT_X, new Date(MuleManager.getInstance().getStartDate())).getMessage());
        msgs.add(new Message(Messages.SERVER_SHUTDOWN_AT_X, new Date().toString()).getMessage());
        shutdownMessage = StringMessageHelper.getBoilerPlate(msgs, '*', 80);

        System.exit(0);
    }
View Full Code Here

    public void setLifecycleManager(LifecycleManager manager)
    {
        if (!(manager instanceof MuleContextLifecycleManager))
        {
            Message msg = MessageFactory.createStaticMessage(
                "lifecycle manager for MuleContext must be a MuleContextLifecycleManager");
            throw new MuleRuntimeException(msg);
        }
       
        lifecycleManager = (MuleContextLifecycleManager) manager;
View Full Code Here

        return route;
    }

    private static Message generateMessage(Message message, MessageProcessor target)
    {
        Message m = CoreMessages.failedToRouterViaEndpoint(target);
        if (message != null)
        {
            message.setNextMessage(m);
            return message;
        }
View Full Code Here

    private static Message constructMessage(SecurityContext context, URI endpointURI,
                                            SecurityFilter filter)
    {

        Message m;
        if (context == null)
        {
            m = CoreMessages.authSetButNoContext(filter.getClass().getName());
        }
        else
        {
            m = CoreMessages.authFailedForUser(context.getAuthentication().getPrincipal());
        }
        m.setNextMessage(CoreMessages.authDeniedOnEndpoint(endpointURI));
        return m;
    }
View Full Code Here

    private static Message constructMessage(SecurityContext context,
                                            URI endpointURI,
                                            SecurityFilter filter)
    {

        Message m;
        if (context == null)
        {
            m = CoreMessages.authSetButNoContext(filter.getClass().getName());
        }
        else
        {
            m = CoreMessages.authFailedForUser(context.getAuthentication().getPrincipal());
        }
        m.setNextMessage(CoreMessages.authorizationDeniedOnEndpoint(endpointURI));
        return m;
    }
View Full Code Here

        {
            muleMessageFactory = connector.getMuleMessageFactory();
        }
        catch (CreateException ce)
        {
            Message message = MessageFactory.createStaticMessage(ce.getMessage());
            throw new InitialisationException(message, ce, this);
        }
    }
View Full Code Here

    {
        InputStream is = IOUtils.getResourceAsStream(fileName, callingClass,
                /* tryAsFile */true, /* tryAsUrl */false);
        if (is == null)
        {
            Message error = CoreMessages.cannotLoadFromClasspath(fileName);
            throw new IOException(error.toString());
        }

        return loadProperties(is);
    }
View Full Code Here

    public static Properties loadProperties(URL url) throws IOException
    {
        if (url == null)
        {
            Message error = CoreMessages.objectIsNull("url");
            throw new IOException(error.toString());
        }

        return loadProperties(url.openStream());
    }
View Full Code Here

    public static Properties loadProperties(InputStream is) throws IOException
    {
        if (is == null)
        {
            Message error = CoreMessages.objectIsNull("input stream");
            throw new IOException(error.toString());
        }

        try
        {
            Properties props = new Properties();
View Full Code Here

TOP

Related Classes of org.mule.config.i18n.Message

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.