Package org.apache.cxf.logging

Examples of org.apache.cxf.logging.FaultListener


                        Exception ex2 = message.getContent(Exception.class);
                        if (ex2 == null) {
                            ex2 = ex;
                        }
                       
                        FaultListener flogger = (FaultListener)
                                message.getContextualProperty(FaultListener.class.getName());
                        boolean useDefaultLogging = true;
                        if (flogger != null) {
                            useDefaultLogging = flogger.faultOccurred(ex2, description.toString(), message);
                        }
                        if (useDefaultLogging) {
                            doDefaultLogging(message, ex2, description);
                        }
                       
View Full Code Here


                        Exception ex2 = message.getContent(Exception.class);
                        if (ex2 == null) {
                            ex2 = ex;
                        }
                       
                        FaultListener flogger = (FaultListener)
                                message.getContextualProperty(FaultListener.class.getName());
                        boolean useDefaultLogging = true;
                        if (flogger != null) {
                            useDefaultLogging = flogger.faultOccurred(ex2, description.toString(), message);
                        }
                        if (useDefaultLogging) {
                            doDefaultLogging(message, ex2, description);
                        }
                       
View Full Code Here

    private void setUpCustomLogger(boolean useCustomLogger,
                                   boolean expectFault,
                                   boolean returnFromCustomLogger) {
        if (useCustomLogger) {
            FaultListener customLogger = control.createMock(FaultListener.class);
            message.getContextualProperty(FaultListener.class.getName());
            EasyMock.expectLastCall().andReturn(customLogger);
            if (expectFault) {
                customLogger.faultOccurred(EasyMock.isA(Exception.class),
                                 EasyMock.isA(String.class),
                                 EasyMock.isA(Message.class));
                EasyMock.expectLastCall().andReturn(returnFromCustomLogger);
                if (returnFromCustomLogger) {
                    //default logging should also be invoked
View Full Code Here

    private void setUpCustomLogger(boolean useCustomLogger,
                                   boolean expectFault,
                                   boolean returnFromCustomLogger) {
        if (useCustomLogger) {
            FaultListener customLogger = control.createMock(FaultListener.class);
            message.getContextualProperty(FaultListener.class.getName());
            EasyMock.expectLastCall().andReturn(customLogger);
            if (expectFault) {
                customLogger.faultOccurred(EasyMock.isA(Exception.class),
                                 EasyMock.isA(String.class),
                                 EasyMock.isA(Message.class));
                EasyMock.expectLastCall().andReturn(returnFromCustomLogger);
                if (returnFromCustomLogger) {
                    //default logging should also be invoked
View Full Code Here

                        Exception ex2 = message.getContent(Exception.class);
                        if (ex2 == null) {
                            ex2 = ex;
                        }
                       
                        FaultListener flogger = (FaultListener)
                                message.getContextualProperty(FaultListener.class.getName());
                        boolean useDefaultLogging = true;
                        if (flogger != null) {
                            useDefaultLogging = flogger.faultOccurred(ex2, description.toString(), message);
                        }
                        if (useDefaultLogging) {
                            doDefaultLogging(message, ex2, description);
                        }
                       
View Full Code Here

        if (r == null) {
            r = Response.serverError().build();
        }
       
        Message msg = PhaseInterceptorChain.getCurrentMessage();
        FaultListener flogger = null;
        if (msg != null) {
            flogger = (FaultListener)PhaseInterceptorChain.getCurrentMessage()
                .getContextualProperty(FaultListener.class.getName());
        }
        if (flogger != null || LOG.isLoggable(Level.FINE)) {
            String errorMessage = buildErrorMessage(r, ex);
           
            boolean doDefault =
                flogger != null ? flogger.faultOccurred(ex, errorMessage, msg) : true;
            if (doDefault && LOG.isLoggable(Level.FINE)) {
                LOG.log(Level.FINE, errorMessage, ex);
            }
        }
        if (printStackTrace) {
View Full Code Here

                        Exception ex2 = message.getContent(Exception.class);
                        if (ex2 == null) {
                            ex2 = ex;
                        }
                       
                        FaultListener flogger = (FaultListener)
                                message.getContextualProperty(FaultListener.class.getName());
                        boolean useDefaultLogging = true;
                        if (flogger != null) {
                            useDefaultLogging = flogger.faultOccurred(ex2, description.toString(), message);
                        }
                        if (useDefaultLogging) {
                            doDefaultLogging(message, ex2, description);
                        }
                       
View Full Code Here

                        Exception ex2 = message.getContent(Exception.class);
                        if (ex2 == null) {
                            ex2 = ex;
                        }
                       
                        FaultListener flogger = (FaultListener)
                                message.getContextualProperty(FaultListener.class.getName());
                        boolean useDefaultLogging = true;
                        if (flogger != null) {
                            useDefaultLogging = flogger.faultOccurred(ex2, description.toString(), message);
                        }
                        if (useDefaultLogging) {
                            doDefaultLogging(message, ex2, description);
                        }
                       
View Full Code Here

                        Exception ex2 = message.getContent(Exception.class);
                        if (ex2 == null) {
                            ex2 = ex;
                        }
                       
                        FaultListener flogger = (FaultListener)
                                message.getContextualProperty(FaultListener.class.getName());
                        boolean useDefaultLogging = true;
                        if (flogger != null) {
                            useDefaultLogging = flogger.faultOccurred(ex2, description.toString(), message);
                        }
                        if (useDefaultLogging) {
                            doDefaultLogging(message, ex2, description);
                        }
                       
View Full Code Here

                        Exception ex2 = message.getContent(Exception.class);
                        if (ex2 == null) {
                            ex2 = ex;
                        }
                       
                        FaultListener flogger = (FaultListener)
                                message.getContextualProperty(FaultListener.class.getName());
                        boolean useDefaultLogging = true;
                        if (flogger != null) {
                            useDefaultLogging = flogger.faultOccurred(ex2, description.toString(), message);
                        }
                        if (useDefaultLogging) {
                            doDefaultLogging(message, ex2, description);
                        }
                       
View Full Code Here

TOP

Related Classes of org.apache.cxf.logging.FaultListener

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.