Interface Mediator

    • 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
      • isContentAware

        boolean isContentAware()
      • isContentAltering

        boolean isContentAltering()
        This is used to indicate whether message payload get modified during mediation
        Returns:
        whether mediator modify the payload
      • getMediatorPosition

        int getMediatorPosition()
        Get the position of the mediator in sequence flow.
        Returns:
        position of the mediator in sequence
      • setMediatorPosition

        void setMediatorPosition​(int position)
        Set the position of the mediator in the sequence
        Parameters:
        position - position
      • setShortDescription

        void setShortDescription​(String shortDescription)
        Set the short description of the mediator
        Parameters:
        shortDescription - to be set to the artifact
      • getShortDescription

        String getShortDescription()
        Retrieves the short description of the mediator
        Returns:
        short description of the artifact
      • getMediatorName

        String getMediatorName()
        Returns name of the mediator class. This was introduced due to that getType is not uniquely implemented for all mediators to get the name.
        Returns:
        a String of the mediator class name
      • reportOpenStatistics

        Integer reportOpenStatistics​(MessageContext synCtx,
                                     boolean isContentAltering)
        Report Open Statistic Event for the Mediator
      • reportCloseStatistics

        void reportCloseStatistics​(MessageContext synCtx,
                                   Integer currentIndex)
        Report Close Statistic Event for the Mediator
      • setComponentStatisticsId

        void setComponentStatisticsId​(ArtifactHolder holder)