Class BodyFactory

java.lang.Object
com.rollbar.notifier.util.BodyFactory

public class BodyFactory extends Object
Body factory helper to build the proper body depending on the throwable or the description.
  • Constructor Details

    • BodyFactory

      public BodyFactory()
  • Method Details

    • from

      @Deprecated public com.rollbar.api.payload.data.body.Body from(Throwable throwable, String description)
      Deprecated.
      Builds the body for the throwable and description supplied.
      Parameters:
      throwable - the throwable.
      description - the description.
      Returns:
      the body.
    • from

      public com.rollbar.api.payload.data.body.Body from(ThrowableWrapper throwableWrapper, String description)
      Builds the body from the throwableWrapper and the description supplied.
      Parameters:
      throwableWrapper - the throwable proxy.
      description - the description.
      Returns:
      the body.
    • from

      public com.rollbar.api.payload.data.body.Body from(ThrowableWrapper throwableWrapper, String description, List<com.rollbar.api.payload.data.TelemetryEvent> telemetryEvents)
      Builds the body from the throwableWrapper, the description supplied and telemetry events.
      Parameters:
      throwableWrapper - the throwable proxy.
      description - the description.
      telemetryEvents - the telemetry events.
      Returns:
      the body.
    • from

      public com.rollbar.api.payload.data.body.RollbarThread from(Thread thread)
      Builds a RollbarThread from a Thread.
      Parameters:
      thread - the thread.
      Returns:
      the RollbarThread.
    • from

      public com.rollbar.api.payload.data.body.Group from(StackTraceElement[] stackTraceElements)
      Builds a Group from an Array of StackTraceElement.
      Parameters:
      stackTraceElements - the stack trace elements.
      Returns:
      the Group.