org.openeai.implementations.gateways.transroutergateway
Interface RoutingCriteriaCommand

All Known Implementing Classes:
PaymasterRoutingCriteria, StudentLegacyRoutingCriteria

public interface RoutingCriteriaCommand

This is the interface that all RoutingCriteriaCommands must implement. It defines one method (shouldRoute) that they must implement. It is in this 'shouldRoute' method that the specific business logic for the command is coded. This specific business logic will be executed by the EnterpriseTransRouter to determine if the target application should be routed to based on the content of the message passed in (or other rules as implemented in the RoutingCriteriaCommand implementation).

Author:
Tod Jackson

Method Summary
 boolean shouldRoute(AppConfig aConfig, org.jdom.Document inDoc)
          Must be implemented by the specific 'Routing Criteria' classes that implement this interface.
 

Method Detail

shouldRoute

public boolean shouldRoute(AppConfig aConfig,
                           org.jdom.Document inDoc)
                    throws RoutingCriteriaCommandException
Must be implemented by the specific 'Routing Criteria' classes that implement this interface. TransRoute will ask the implementation if it should route to the end points based on the contents of the message.

This method can use all resources at it's disposal to determine if an end-point wants the message routed to it. This could be based simply on the content of the message passed in, or it could be more complicated like querying an authoritative source for additional information that isn't provided in the message by using resources supplied by the AppConfig object passed in.

Returns:
boolean true means the router that invoked this method shoul route the message to the end-point.
RoutingCriteriaCommandException


Copyright © 2002, OpenEAI Software Foundation