Package org.apache.qpid.server.logging

Examples of org.apache.qpid.server.logging.NullRootMessageLogger


     */
    public void testLIFO() throws AMQException, ConfigurationException
    {
        assertTrue("Unexpected actor: " + CurrentActor.get(), CurrentActor.get() instanceof TestLogActor);
        AMQPConnectionActor connectionActor = new AMQPConnectionActor(getConnection(),
                                                                      new NullRootMessageLogger());

        /*
         * Push the actor on to the stack:
         *
         *  CurrentActor -> Connection
         *       Stack   -> null
         */
        CurrentActor.set(connectionActor);

        //Use the Actor to send a simple message
        sendTestLogMessage(CurrentActor.get());

        // Verify it was the same actor as we set earlier
        assertEquals("Retrieved actor is not as expected ",
                     connectionActor, CurrentActor.get());

        /**
         * Set the actor to now be the Channel actor so testing the ability
         * to push the actor on to the stack:
         *
         *  CurrentActor -> Channel
         *       Stack   -> Connection, null
         *
         */

        AMQSessionModel channel = BrokerTestHelper.createSession(1, getConnection());

        AMQPChannelActor channelActor = new AMQPChannelActor(channel,
                                                             new NullRootMessageLogger());

        CurrentActor.set(channelActor);

        //Use the Actor to send a simple message
        sendTestLogMessage(CurrentActor.get());
View Full Code Here


            try
            {
                LogActor defaultActor = CurrentActor.get();

                AMQPConnectionActor actor = new AMQPConnectionActor(getConnection(),
                                                                    new NullRootMessageLogger());

                CurrentActor.set(actor);

                //Use the Actor to send a simple message
                sendTestLogMessage(CurrentActor.get());
View Full Code Here

    }

    @Override
    public void initialise() throws Exception
    {
        CurrentActor.setDefault(new BrokerActor(new NullRootMessageLogger()));
        GenericActor.setDefaultMessageLogger(new NullRootMessageLogger());
        super.initialise();
    }
View Full Code Here

    }

    @Override
    public void initialise() throws Exception
    {
        CurrentActor.setDefault(new BrokerActor(new NullRootMessageLogger()));
        GenericActor.setDefaultMessageLogger(new NullRootMessageLogger());
        super.initialise();
    }
View Full Code Here

            {
                performDBBackup(fromDir, backupDir, force);
            }
        }

        CurrentActor.set(new BrokerActor(new NullRootMessageLogger()));

        //Create a new messageStore
        _newMessageStore = new BDBMessageStore();
        _newMessageStore.configure(toDir, false);
        _newMessageStore.start();
View Full Code Here

     */
    public void testLIFO() throws AMQException, ConfigurationException
    {
        assertTrue("Unexpected actor: " + CurrentActor.get(), CurrentActor.get() instanceof TestLogActor);
        AMQPConnectionActor connectionActor = new AMQPConnectionActor(getSession(),
                                                                      new NullRootMessageLogger());

        /*
         * Push the actor on to the stack:
         *
         *  CurrentActor -> Connection
         *       Stack   -> null
         */
        CurrentActor.set(connectionActor);

        //Use the Actor to send a simple message
        sendTestLogMessage(CurrentActor.get());

        // Verify it was the same actor as we set earlier
        assertEquals("Retrieved actor is not as expected ",
                     connectionActor, CurrentActor.get());

        /**
         * Set the actor to now be the Channel actor so testing the ability
         * to push the actor on to the stack:
         *
         *  CurrentActor -> Channel
         *       Stack   -> Connection, null
         *
         */

        AMQChannel channel = new AMQChannel(getSession(), 1, getSession().getVirtualHost().getMessageStore());

        AMQPChannelActor channelActor = new AMQPChannelActor(channel,
                                                             new NullRootMessageLogger());

        CurrentActor.set(channelActor);

        //Use the Actor to send a simple message
        sendTestLogMessage(CurrentActor.get());
View Full Code Here

            try
            {
                LogActor defaultActor = CurrentActor.get();

                AMQPConnectionActor actor = new AMQPConnectionActor(getSession(),
                                                                    new NullRootMessageLogger());

                CurrentActor.set(actor);

                //Use the Actor to send a simple message
                sendTestLogMessage(CurrentActor.get());
View Full Code Here

    private AbstractManagementActor _logActor;

    @Override
    public void setUp()
    {
        _logActor = new AbstractManagementActor(new NullRootMessageLogger(), AbstractManagementActor.UNKNOWN_PRINCIPAL)
        {
            @Override
            public String getLogMessage()
            {
                return null;
View Full Code Here

    }

    public void testSubmitAndWaitCurrentActorAndSecurityManagerSubjectAreRespected() throws Exception
    {
        _executor.start();
        LogActor actor = new TestLogActor(new NullRootMessageLogger());
        Subject subject = new Subject();
        Subject currentSecurityManagerSubject = SecurityManager.getThreadSubject();
        final AtomicReference<LogActor> taskLogActor = new AtomicReference<LogActor>();
        final AtomicReference<Subject> taskSubject = new AtomicReference<Subject>();
        try
View Full Code Here

     * before task execution is the CurrentActor after execution.
     */
    public void testCurrentActorStackBalance() throws Exception
    {
        //create and set a test actor
        LogActor testActor = new TestLogActor(new NullRootMessageLogger());
        CurrentActor.set(testActor);

        //verify it is returned correctly before executing a HouseKeepingTask
        assertEquals("Expected LogActor was not returned", testActor, CurrentActor.get());

View Full Code Here

TOP

Related Classes of org.apache.qpid.server.logging.NullRootMessageLogger

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.