Package org.apache.hivemind

Examples of org.apache.hivemind.ErrorHandler


            // id of the service being constructed, or of the factory being invoked.
            // Here, we're using the constructed service ... with the intent being that
            // users will enable debugging for the service (or search the logs for the service)
            // if it fails to build properly.

            ErrorHandler errorHandler = _contributingModule.getErrorHandler();
           
            SchemaProcessorImpl processor =
                new SchemaProcessorImpl(errorHandler, serviceLog, schema);

            processor.process(_parameters, _contributingModule);
View Full Code Here


        catch (Exception ex)
        {
            // Have to decide if we need to display the location of the rule
            // or the element.

            ErrorHandler errorHandler = processor.getContributingModule().getErrorHandler();
            errorHandler.error(
                LOG,
                RulesMessages.unableToSetElementProperty(
                    propertyName,
                    target,
                    processor,
View Full Code Here

        dib.setClassFactory(cf);

        Module module = newModule();

        ErrorHandler eh = getErrorHandler();
        Log log = getLog();

        replayControls();

        PipelineAssembler pa =
View Full Code Here

    private void executeNonClassContribution(String name, Class objectClass, String message)
    {
        List l = Collections.singletonList(build(name, objectClass));

        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);

        eh.error(null, message, null, null);

        replayControls();

        BeanFactoryImpl f = new BeanFactoryImpl(null, eh, Object.class, l, true);
View Full Code Here

    public void testIncorrectType()
    {
        List l = Collections.singletonList(build("array-list", ArrayList.class));

        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);

        eh.error(
            null,
            "Contribution 'array-list' (class java.util.ArrayList) is not assignable to interface java.util.Map and has been ignored.",
            null,
            null);
View Full Code Here

    }

    public void testTerminatorConflict()
    {
        MockControl c = newControl(ErrorHandler.class);
        ErrorHandler eh = (ErrorHandler) c.getMock();

        Log log = getLog();

        eh.error(
            log,
            "Terminator ss2 for pipeline service foo.bar conflicts with "
                + "previous terminator (ss1, at unknown location) and has been ignored.",
            null,
            null);
View Full Code Here

        verifyControls();
    }

    public void testIncorrectTerminatorType()
    {
        ErrorHandler eh = getErrorHandler();
        Log log = getLog();

        eh.error(
            log,
            "-String- is not an instance of interface "
                + "org.apache.hivemind.lib.pipeline.StandardService suitable for "
                + "use as part of the pipeline for service foo.bar.",
            null,
View Full Code Here

    {
        List l = new ArrayList();
        l.add(build("list", ArrayList.class));
        l.add(build("list", LinkedList.class));

        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);

        eh.error(
            null,
            "Contribution 'list' duplicates a previous contribution (at unknown location) and has been ignored.",
            null,
            null);
View Full Code Here

        verifyControls();
    }

    public void testIncorrectFilterType()
    {
        ErrorHandler eh = getErrorHandler();
        Log log = getLog();

        eh.error(
            log,
            "-String- is not an instance of interface "
                + "org.apache.hivemind.lib.pipeline.StandardFilter suitable for "
                + "use as part of the pipeline for service foo.bar.",
            null,
View Full Code Here

        MockControl logControl = newControl(Log.class);
        Log log = (Log) logControl.getMock();

        TaskExecutor e = new TaskExecutor();

        ErrorHandler errorHandler = (ErrorHandler) newMock(ErrorHandler.class);

        e.setErrorHandler(errorHandler);
        e.setLog(log);
        e.setMessages(getMessages());
        e.setTasks(tasks);
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ErrorHandler

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.