dispatch

The dispatch method sends offers to the target gateways in the IDispatcher interface.

boolean dispatch(java.lang.String channel,
            java.lang.String gatewayName,
            java.util.Collection<com.unicacorp.interact.api.Offer> offers,
            com.unicacorp.interact.api.NameValuePair[] profileData)
              throws com.unicacorp.interact.exceptions.InteractException

Once outbound channels are selected for a candidate offer, Unica Interact tries to send the candidate offers to the handlers associated to the channel. The handlers are attempted based on their defined priorities from high to low. For each handler, Unica Interact invokes this method of the configured dispatcher. It is up to the implementation of this dispatcher instance how to route the offer to the target gateway, which is configured in the same handler. If there are multiple offers sent to the same handler as a result of the same triggered message evaluation, Unica Interact tries to send all these offers in one batch.

The dispatch method requires the following parameters:

  • channel - the outbound channel these offers are sent to
  • gatewayName - the name of the target gateway
  • offers - the offers to be sent to the gateway in a batch
  • profileData - profile attributes populated by IGateway.validate and are passed to IGateway.deliver

Return value

The dispatch method returns if the dispatch succeeded or failed

Throws

com.unicacorp.interact.exceptions.InteractException