Class ExceptionAsString
- java.lang.Object
-
- com.adaptris.core.services.exception.ExceptionAsString
-
- All Implemented Interfaces:
ExceptionSerializer
public class ExceptionAsString extends java.lang.Object implements ExceptionSerializer
Serializes the exception as a String.Note that this uses
org.apache.commons.lang3.exception.ExceptionUtils#getFullStackTrace(Throwable)
which means that the root cause is first- Since:
- 3.7.3
In the adapter configuration file this class is aliased as exception-as-string which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description ExceptionAsString()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
getIncludeStackTrace()
DataOutputParameter<java.lang.String>
getTarget()
void
serialize(java.lang.Exception exc, AdaptrisMessage msg)
Serialize the exception into the adaptris message.void
setIncludeStackTrace(java.lang.Boolean includeStackTrace)
void
setTarget(DataOutputParameter<java.lang.String> target)
ExceptionAsString
withIncludeStackTrace(java.lang.Boolean b)
ExceptionAsString
withTarget(DataOutputParameter<java.lang.String> target)
-
-
-
Method Detail
-
serialize
public void serialize(java.lang.Exception exc, AdaptrisMessage msg) throws CoreException
Description copied from interface:ExceptionSerializer
Serialize the exception into the adaptris message.- Specified by:
serialize
in interfaceExceptionSerializer
- Parameters:
exc
- the exceptionmsg
- the message- Throws:
CoreException
- wrapping other exceptions.
-
getTarget
public DataOutputParameter<java.lang.String> getTarget()
-
setTarget
public void setTarget(DataOutputParameter<java.lang.String> target)
-
withTarget
public ExceptionAsString withTarget(DataOutputParameter<java.lang.String> target)
-
getIncludeStackTrace
public java.lang.Boolean getIncludeStackTrace()
-
setIncludeStackTrace
public void setIncludeStackTrace(java.lang.Boolean includeStackTrace)
-
withIncludeStackTrace
public ExceptionAsString withIncludeStackTrace(java.lang.Boolean b)
-
-