Package 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.
-
-
Constructor Summary
Constructors Constructor Description BinaryExtractMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBinaryEncoding()
int
getDataType()
int
getLength()
int
getOffset()
int
getTraceState()
String
getType()
String
getVariableName()
boolean
mediate(org.apache.synapse.MessageContext msgCtx)
void
setBinaryEncoding(String binaryEncoding)
void
setDataType(int dataType)
void
setLength(int length)
void
setOffset(int offset)
void
setTraceState(int traceState)
void
setVariableName(String variableName)
-
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, handleException, handleException, isBreakPoint, isContentAltering, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
-
-
-
Method Detail
-
mediate
public boolean mediate(org.apache.synapse.MessageContext msgCtx)
-
getType
public String getType()
- Specified by:
getType
in interfaceorg.apache.synapse.Mediator
- Overrides:
getType
in classorg.apache.synapse.mediators.AbstractMediator
-
setTraceState
public void setTraceState(int traceState)
- Specified by:
setTraceState
in interfaceorg.apache.synapse.Mediator
- Overrides:
setTraceState
in classorg.apache.synapse.mediators.AbstractMediator
-
getTraceState
public int getTraceState()
- Specified by:
getTraceState
in interfaceorg.apache.synapse.Mediator
- Overrides:
getTraceState
in classorg.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)
-
-