Package org.apache.hivemind

Examples of org.apache.hivemind.ErrorLog


    {
        TaskExecutor executor = new TaskExecutor();
        executor.setTasks(configuration("tasks", List.class));
        // Some of the logic which is automatically provided by the builder factory
        // must be done manually
        ErrorLog errorLog = new ErrorLogImpl(new DefaultErrorHandler(), LogFactory.getLog(TaskExecutor.class));
        executor.setErrorLog(errorLog);
        executor.setMessages(new MessageFormatter(PanoramaStartupModule.class, "panorama"));
        executor.setLog(LogFactory.getLog(TaskExecutor.class));
       
        return executor;
View Full Code Here


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

        TaskExecutor e = new TaskExecutor();

        ErrorLog errorLog = (ErrorLog) newMock(ErrorLog.class);

        e.setErrorLog(errorLog);
        e.setLog(log);
        e.setMessages(getMessages());
        e.setTasks(tasks);
View Full Code Here

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

        MockControl errorLogControl = newControl(ErrorLog.class);
        ErrorLog errorLog = (ErrorLog) errorLogControl.getMock();

        log.info("Executing task Failure.");

        errorLog.error(
                "Exception while executing task Failure: Failure!",
                null,
                new ApplicationRuntimeException(""));
        errorLogControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
        { null, null, new TypeMatcher() }));
View Full Code Here

    {
        if (_factory == null)
        {
            ServicePoint factoryPoint = contributingModule.getServicePoint(_factoryServiceId);

            ErrorLog errorLog = servicePoint.getErrorLog();
           
            _factory = (ServiceImplementationFactory) factoryPoint
                .getService(ServiceImplementationFactory.class);

            ServicePointDefinition spd = factoryPoint.getServicePointDefinition();
View Full Code Here

    {
        Location location = newLocation();
        EventProducer p = new EventProducer();
        Object c = "NeverwinterNights";

        ErrorLog el = (ErrorLog) newMock(ErrorLog.class);

        el
                .error(
                        "NeverwinterNights does not implement any listener interfaces compatible with EventProducer.",
                        location,
                        null);
View Full Code Here

    {
        Location location = newLocation();
        EventProducer p = new EventProducer();
        Object c = "SoulCailiburII";

        ErrorLog el = (ErrorLog) newMock(ErrorLog.class);

        el.error("EventProducer does not implement an event set named 'fred'.", location, null);

        replayControls();

        EventLinker l = new EventLinkerImpl(el);
View Full Code Here

    {
        Location location = newLocation();
        EventProducer p = new EventProducer();
        Object c = "SplinterCell";

        ErrorLog el = (ErrorLog) newMock(ErrorLog.class);

        el
                .error(
                        "SplinterCell does not implement the java.beans.PropertyChangeListener listener interface (for event set 'propertyChange' of EventProducer).",
                        location,
                        null);
View Full Code Here

    {
        Location location = newLocation();
        Object p = "DanceDanceRevolution";
        Object c = "SplinterCell";

        ErrorLog el = (ErrorLog) newMock(ErrorLog.class);

        el
                .error(
                        "SplinterCell does not implement any listener interfaces compatible with DanceDanceRevolution.",
                        location,
                        null);
View Full Code Here

        MockControl mc = newControl(Module.class);
        Module module = (Module) mc.getMock();

        MockControl errorLogc = newControl(ErrorLog.class);
        ErrorLog errorLog = (ErrorLog) errorLogc.getMock();

        fp.getLog();
        fpc.setReturnValue(log);

        fp.getServiceId();
        fpc.setReturnValue("foo.Bar");

        fp.getInvokingModule();
        fpc.setReturnValue(module);

        module.resolveType("org.apache.hivemind.service.impl.InitializerErrorRunnable");
        mc.setReturnValue(InitializerErrorRunnable.class);

        fp.getErrorLog();
        fpc.setReturnValue(errorLog);

        Throwable cause = new ApplicationRuntimeException("Failure in initializeService().");

        String message = ServiceMessages.unableToInitializeService(
                "foo.Bar",
                "initializeService",
                InitializerErrorRunnable.class,
                cause);

        errorLog.error(message, l, new ApplicationRuntimeException(""));
        errorLogc.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
        { null, null, new TypeMatcher() }));

        BuilderParameter p = new BuilderParameter();
        p.setClassName(InitializerErrorRunnable.class.getName());
View Full Code Here

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

        TaskExecutor e = new TaskExecutor();

        ErrorLog errorLog = (ErrorLog) newMock(ErrorLog.class);

        e.setErrorLog(errorLog);
        e.setLog(log);
        e.setMessages(getMessages());
        e.setTasks(tasks);
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ErrorLog

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.