Class DefaultExceptionRecorder

java.lang.Object
io.datarouter.exception.service.DefaultExceptionRecorder
All Implemented Interfaces:
io.datarouter.web.exception.ExceptionRecorder

public class DefaultExceptionRecorder
extends java.lang.Object
implements io.datarouter.web.exception.ExceptionRecorder
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.datarouter.web.exception.ExceptionRecorder

    io.datarouter.web.exception.ExceptionRecorder.NoOpExceptionRecorder
  • Constructor Summary

    Constructors 
    Constructor Description
    DefaultExceptionRecorder()  
  • Method Summary

    Modifier and Type Method Description
    io.datarouter.instrumentation.exception.ExceptionRecordDto recordException​(java.lang.Throwable exception, io.datarouter.storage.exception.ExceptionCategory category, java.lang.String location, java.lang.String methodName, java.lang.Integer lineNumber, java.lang.String callOrigin)  
    io.datarouter.instrumentation.exception.ExceptionRecordDto recordExceptionAndHttpRequest​(java.lang.Throwable exception, java.lang.String location, java.lang.String methodName, java.lang.Integer lineNumber, javax.servlet.http.HttpServletRequest request, java.lang.String callOrigin)  
    void recordHttpRequest​(javax.servlet.http.HttpServletRequest request)  
    protected void report​(ExceptionRecord exceptionRecord, io.datarouter.storage.exception.ExceptionCategory category)  
    java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordException​(java.lang.Throwable exception, java.lang.String callOrigin)  
    java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordException​(java.lang.Throwable exception, java.lang.String callOrigin, io.datarouter.storage.exception.ExceptionCategory category)  
    java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordExceptionAndHttpRequest​(java.lang.Throwable exception, java.lang.String callOrigin, javax.servlet.http.HttpServletRequest request)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • tryRecordException

      public java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordException​(java.lang.Throwable exception, java.lang.String callOrigin)
      Specified by:
      tryRecordException in interface io.datarouter.web.exception.ExceptionRecorder
    • tryRecordException

      public java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordException​(java.lang.Throwable exception, java.lang.String callOrigin, io.datarouter.storage.exception.ExceptionCategory category)
      Specified by:
      tryRecordException in interface io.datarouter.web.exception.ExceptionRecorder
    • recordException

      public io.datarouter.instrumentation.exception.ExceptionRecordDto recordException​(java.lang.Throwable exception, io.datarouter.storage.exception.ExceptionCategory category, java.lang.String location, java.lang.String methodName, java.lang.Integer lineNumber, java.lang.String callOrigin)
      Specified by:
      recordException in interface io.datarouter.web.exception.ExceptionRecorder
    • tryRecordExceptionAndHttpRequest

      public java.util.Optional<io.datarouter.instrumentation.exception.ExceptionRecordDto> tryRecordExceptionAndHttpRequest​(java.lang.Throwable exception, java.lang.String callOrigin, javax.servlet.http.HttpServletRequest request)
      Specified by:
      tryRecordExceptionAndHttpRequest in interface io.datarouter.web.exception.ExceptionRecorder
    • recordExceptionAndHttpRequest

      public io.datarouter.instrumentation.exception.ExceptionRecordDto recordExceptionAndHttpRequest​(java.lang.Throwable exception, java.lang.String location, java.lang.String methodName, java.lang.Integer lineNumber, javax.servlet.http.HttpServletRequest request, java.lang.String callOrigin)
      Specified by:
      recordExceptionAndHttpRequest in interface io.datarouter.web.exception.ExceptionRecorder
    • report

      protected void report​(ExceptionRecord exceptionRecord, io.datarouter.storage.exception.ExceptionCategory category)
    • recordHttpRequest

      public void recordHttpRequest​(javax.servlet.http.HttpServletRequest request)
      Specified by:
      recordHttpRequest in interface io.datarouter.web.exception.ExceptionRecorder