Class PublishEventMediator

  • All Implemented Interfaces:
    org.apache.synapse.aspects.AspectConfigurable, org.apache.synapse.Mediator, org.apache.synapse.SynapseArtifact

    public class PublishEventMediator
    extends org.apache.synapse.mediators.AbstractMediator
    Mediator that extracts data from current message payload/header according to the given configuration. Extracted information is sent as an event.
    • Constructor Detail

      • PublishEventMediator

        public PublishEventMediator()
    • Method Detail

      • isContentAware

        public boolean isContentAware()
        Specified by:
        isContentAware in interface org.apache.synapse.Mediator
        Overrides:
        isContentAware in class org.apache.synapse.mediators.AbstractMediator
      • mediate

        public boolean mediate​(org.apache.synapse.MessageContext messageContext)
        This is called when a new message is received for mediation. Extracts data from message to construct an event based on the mediator configuration Sends the constructed event to the event sink specified in mediator configuration
        Parameters:
        messageContext - Message context of the message to be mediated
        Returns:
        Always returns true. (instructs to proceed with next mediator)
      • getEventSink

        public org.wso2.carbon.event.sink.EventSink getEventSink()
      • getEventSinkName

        public String getEventSinkName()
      • getStreamName

        public String getStreamName()
      • getStreamVersion

        public String getStreamVersion()
      • getMetaProperties

        public List<Property> getMetaProperties()
      • getCorrelationProperties

        public List<Property> getCorrelationProperties()
      • getPayloadProperties

        public List<Property> getPayloadProperties()
      • getArbitraryProperties

        public List<Property> getArbitraryProperties()
      • setEventSink

        public void setEventSink​(org.wso2.carbon.event.sink.EventSink eventSink)
      • setEventSinkName

        public void setEventSinkName​(String eventSinkName)
      • setStreamName

        public void setStreamName​(String streamName)
      • setStreamVersion

        public void setStreamVersion​(String streamVersion)
      • setMetaProperties

        public void setMetaProperties​(List<Property> metaProperties)
      • setCorrelationProperties

        public void setCorrelationProperties​(List<Property> correlationProperties)
      • setPayloadProperties

        public void setPayloadProperties​(List<Property> payloadProperties)
      • setArbitraryProperties

        public void setArbitraryProperties​(List<Property> arbitraryProperties)
      • setAsync

        public void setAsync​(boolean async)
      • isAsync

        public boolean isAsync()
      • getAsyncTimeout

        public long getAsyncTimeout()
      • setAsyncTimeout

        public void setAsyncTimeout​(long asyncTimeout)