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, sourceTypesDEFAULT_PRIORITY_WEIGHTING, MAX_PRIORITY_WEIGHTING, MIN_PRIORITY_WEIGHTINGPHASE_NAMEPHASE_NAMEPROPERTY_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, unregisterSourceTypegetAnnotation, getAnnotations, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform, transformprocessinitialisedisposesetNamegetNamesetMuleContextsetEndpointprotected static final int DEFAULT_BUFFER_SIZE
public Object doTransform(Object src, String outputEncoding) throws TransformerException
doTransform in class AbstractTransformerTransformerExceptionprotected String createStringFromInputStream(InputStream input, String outputEncoding) throws TransformerException
TransformerExceptionprotected String createStringFromOutputHandler(OutputHandler handler, String outputEncoding) throws TransformerException
TransformerExceptionprotected String createStringFromByteArray(byte[] bytes, String outputEncoding) throws TransformerException
TransformerExceptionpublic int getPriorityWeighting()
ConvertergetPriorityWeighting in interface ConverterConverter.MIN_PRIORITY_WEIGHTING and Converter.MAX_PRIORITY_WEIGHTING.public void setPriorityWeighting(int priorityWeighting)
ConvertersetPriorityWeighting in interface ConverterpriorityWeighting - the priority weighting for this transformer. This is a value between
Converter.MIN_PRIORITY_WEIGHTING and Converter.MAX_PRIORITY_WEIGHTING.Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.