public class ExceptionAsString extends java.lang.Object implements ExceptionSerializer
Note that this uses ExceptionUtils#getFullStackTrace(Throwable)
which means that the root cause is first
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 and Description |
---|
ExceptionAsString() |
Modifier and Type | Method and 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) |
public void serialize(java.lang.Exception exc, AdaptrisMessage msg) throws CoreException
ExceptionSerializer
serialize
in interface ExceptionSerializer
exc
- the exceptionmsg
- the messageCoreException
- wrapping other exceptions.public DataOutputParameter<java.lang.String> getTarget()
public void setTarget(DataOutputParameter<java.lang.String> target)
public ExceptionAsString withTarget(DataOutputParameter<java.lang.String> target)
public java.lang.Boolean getIncludeStackTrace()
public void setIncludeStackTrace(java.lang.Boolean includeStackTrace)
public ExceptionAsString withIncludeStackTrace(java.lang.Boolean b)