samples.mediators
Class BinaryExtractMediator
java.lang.Object
org.apache.synapse.mediators.AbstractMediator
samples.mediators.BinaryExtractMediator
- All Implemented Interfaces:
- org.apache.synapse.aspects.AspectConfigurable, org.apache.synapse.Mediator, org.apache.synapse.SynapseArtifact
public class BinaryExtractMediator
- extends org.apache.synapse.mediators.AbstractMediator
This mediator analyze a binary message and convert binary to a given datatype and set is as a message property.
User can use the message property for CBR.
User has to set the offset : where to start
length : how many bytes to read
binaryEncodig : utf-8, utf-16, ASCII, Base64
VariableName : property name set with the decoded value in the message context
These values should set as parameters from the synapse configuration layer.
| Fields inherited from class org.apache.synapse.mediators.AbstractMediator |
trace, traceState |
| Methods inherited from class org.apache.synapse.mediators.AbstractMediator |
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getInputType, getLog, getMediatorPosition, getOutputType, getShortDescription, handleException, handleException, isContentAware, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, shouldTrace, traceOrDebug, traceOrDebugWarn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinaryExtractMediator
public BinaryExtractMediator()
mediate
public boolean mediate(org.apache.synapse.MessageContext msgCtx)
getType
public String getType()
- Specified by:
getType in interface org.apache.synapse.Mediator- Overrides:
getType in class org.apache.synapse.mediators.AbstractMediator
setTraceState
public void setTraceState(int traceState)
- Specified by:
setTraceState in interface org.apache.synapse.Mediator- Overrides:
setTraceState in class org.apache.synapse.mediators.AbstractMediator
getTraceState
public int getTraceState()
- Specified by:
getTraceState in interface org.apache.synapse.Mediator- Overrides:
getTraceState in class org.apache.synapse.mediators.AbstractMediator
getLength
public int getLength()
setLength
public void setLength(int length)
getDataType
public int getDataType()
setDataType
public void setDataType(int dataType)
getOffset
public int getOffset()
setOffset
public void setOffset(int offset)
getBinaryEncoding
public String getBinaryEncoding()
setBinaryEncoding
public void setBinaryEncoding(String binaryEncoding)
getVariableName
public String getVariableName()
setVariableName
public void setVariableName(String variableName)
Copyright © 2005–2015 Apache Software Foundation. All rights reserved.