org.apache.synapse
Interface Mediator

All Superinterfaces:
SynapseArtifact
All Known Subinterfaces:
FilterMediator, ListMediator
All Known Implementing Classes:
AbstractDBMediator, AbstractListMediator, AbstractMediator, AggregateMediator, AnnotatedCommandMediator, AnonymousListMediator, BinaryExtractMediator, CacheMediator, CalloutMediator, ClassMediator, CloneMediator, ConditionalRouterMediator, DBLookupMediator, DBReportMediator, DetachMediator, DiscountQuoteMediator, DropMediator, EnqueueMediator, EnrichMediator, EventPublisherMediator, FaultMediator, FilterMediator, HeaderMediator, InMediator, InvokeMediator, IterateMediator, LogMediator, MessageStoreMediator, OutMediator, PayloadFactoryMediator, POJOCommandMediator, PropertyMediator, ReplaceMediator, RMSequenceMediator, SamplingThrottleMediator, ScriptMediator, SEDAMediator, SendMediator, SequenceMediator, SpringCustomLogger, SpringMediator, SwitchMediator, SynapseMediator, TemplateMediator, ThrottleMediator, TransactionMediator, URLRewriteMediator, ValidateMediator, XQueryMediator, XSLTMediator

public interface Mediator
extends SynapseArtifact

All Synapse mediators must implement this Mediator interface. As a message passes through the Synapse system, each mediator's mediate() method is invoked in the sequence/order defined in the SynapseConfiguration.

It is recommended to extend the abstract class AbstractMediator or the AbstractListMediator as appropriate instead of directly implementing this interface

See Also:
AbstractMediator

Method Summary
 int getTraceState()
          This is used to check whether the tracing should be enabled on the current mediator or not
 String getType()
          This is used for debugging purposes and exposes the type of the current mediator for logging and debugging purposes
 boolean mediate(MessageContext synCtx)
          Invokes the mediator passing the current message for mediation.
 void setTraceState(int traceState)
          This is used to set the value of tracing enable variable
 
Methods inherited from interface org.apache.synapse.SynapseArtifact
getDescription, setDescription
 

Method Detail

mediate

boolean mediate(MessageContext synCtx)
Invokes the mediator passing the current message for mediation. Each mediator performs its mediation action, and returns true if mediation should continue, or false if further mediation should be aborted.

Parameters:
synCtx - the current message for mediation
Returns:
true if further mediation should continue

getType

String getType()
This is used for debugging purposes and exposes the type of the current mediator for logging and debugging purposes

Returns:
a String representation of the mediator type

getTraceState

int getTraceState()
This is used to check whether the tracing should be enabled on the current mediator or not

Returns:
value that indicate whether tracing is on, off or unset

setTraceState

void setTraceState(int traceState)
This is used to set the value of tracing enable variable

Parameters:
traceState - Set whether the tracing is enabled or not


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.