samples.mediators
Class DiscountQuoteMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by samples.mediators.DiscountQuoteMediator
All Implemented Interfaces:
AspectConfigurable, Mediator, SynapseArtifact

public class DiscountQuoteMediator
extends AbstractMediator


Field Summary
 
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
trace, traceState
 
Constructor Summary
DiscountQuoteMediator()
           
 
Method Summary
 String getBonusFor()
           
 String getDiscountFactor()
           
 int getTraceState()
          Returns the tracing state
 String getType()
          Returns the class name of the mediator
 boolean mediate(MessageContext mc)
          Invokes the mediator passing the current message for mediation.
 void setBonusFor(String bonus)
           
 void setDiscountFactor(String discount)
           
 void setTraceState(int traceState)
          Set the tracing state variable
 
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getLog, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscountQuoteMediator

public DiscountQuoteMediator()
Method Detail

mediate

public boolean mediate(MessageContext mc)
Description copied from interface: Mediator
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:
mc - the current message for mediation
Returns:
true if further mediation should continue

getType

public String getType()
Description copied from class: AbstractMediator
Returns the class name of the mediator

Specified by:
getType in interface Mediator
Overrides:
getType in class AbstractMediator
Returns:
the class name of the mediator

setTraceState

public void setTraceState(int traceState)
Description copied from class: AbstractMediator
Set the tracing state variable

Specified by:
setTraceState in interface Mediator
Overrides:
setTraceState in class AbstractMediator
Parameters:
traceState - the new tracing state for this mediator (see SynapseConstants)

getTraceState

public int getTraceState()
Description copied from class: AbstractMediator
Returns the tracing state

Specified by:
getTraceState in interface Mediator
Overrides:
getTraceState in class AbstractMediator
Returns:
the tracing state for this mediator (see SynapseConstants)

setDiscountFactor

public void setDiscountFactor(String discount)

getDiscountFactor

public String getDiscountFactor()

setBonusFor

public void setBonusFor(String bonus)

getBonusFor

public String getBonusFor()


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