public class ObjectToString extends AbstractTransformer implements DiscoverableTransformer
ObjectToString
transformer is useful for debugging. It will return
human-readable output for various kinds of objects. Right now, it is just coded to
handle Map and Collection objects. Others will be added.Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_BUFFER_SIZE |
encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes
DEFAULT_PRIORITY_WEIGHTING, MAX_PRIORITY_WEIGHTING, MIN_PRIORITY_WEIGHTING
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
ObjectToString() |
Modifier and Type | Method and Description |
---|---|
protected String |
createStringFromByteArray(byte[] bytes,
String outputEncoding) |
protected String |
createStringFromInputStream(InputStream input,
String outputEncoding) |
protected String |
createStringFromOutputHandler(OutputHandler handler,
String outputEncoding) |
Object |
doTransform(Object src,
String outputEncoding) |
int |
getPriorityWeighting()
If two or more discoverable transformers are equal, this value can be
used to select the correct one
|
void |
setPriorityWeighting(int priorityWeighting)
If 2 or more discoverable transformers are equal, this value can be used
to select the correct one
|
dispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType
getAnnotation, getAnnotations, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform, transform
process
initialise
dispose
setName
getName
setMuleContext
setEndpoint
protected static final int DEFAULT_BUFFER_SIZE
public Object doTransform(Object src, String outputEncoding) throws TransformerException
doTransform
in class AbstractTransformer
TransformerException
protected String createStringFromInputStream(InputStream input, String outputEncoding) throws TransformerException
TransformerException
protected String createStringFromOutputHandler(OutputHandler handler, String outputEncoding) throws TransformerException
TransformerException
protected String createStringFromByteArray(byte[] bytes, String outputEncoding) throws TransformerException
TransformerException
public int getPriorityWeighting()
Converter
getPriorityWeighting
in interface Converter
Converter.MIN_PRIORITY_WEIGHTING
and Converter.MAX_PRIORITY_WEIGHTING
.public void setPriorityWeighting(int priorityWeighting)
Converter
setPriorityWeighting
in interface Converter
priorityWeighting
- the priority weighting for this transformer. This is a value between
Converter.MIN_PRIORITY_WEIGHTING
and Converter.MAX_PRIORITY_WEIGHTING
.Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.