|
|
(4 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | == What is Router==
| + | {{note|This has been removed in SMILA 0.9 by the [[SMILA/Documentation/JobManager|JobManager framework]]}} |
− | | + | |
− | The main goal of Router is to put Record into JMS queue but it also make any [[SMILA/Documentation/QueueWorker|Queue Worker]] specific tasks like executing BPEL piplene. For Tasks information see page See [[SMILA/Documentation/QueueWorker/Tasks|Router/Listener Tasks]]
| + | |
− | | + | |
− | == Interface ==
| + | |
− | | + | |
− | <source lang="java">
| + | |
− | public enum Operation {
| + | |
− | ADD,
| + | |
− | DELETE,
| + | |
− | NONE
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | <source lang="java">
| + | |
− | public interface Router extends QueueWorker {
| + | |
− | void route(Record record, Operation operation) throws RouterException;
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | == Configuration ==
| + | |
− | Schema: "org.eclipse.smila.connectivity.queue.worker/schemas/QueueWorkerConfig.xsd"
| + | |
− | Location: "configuration/org.eclipse.smila.connectivity.queue.worker/RouterConfig.xml"
| + | |
− | | + | |
− | Configuration is a list of routing rules.
| + | |
− | | + | |
− | == Configuration Sample==
| + | |
− | <source lang="xml">
| + | |
− | <RouterConfig xmlns="http://www.eclipse.org/smila/queue"
| + | |
− | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| + | |
− | xsi:noNamespaceSchemaLocation="schemas/QueueWorkerConfig.xsd"
| + | |
− | >
| + | |
− | | + | |
− | <Rule Name="Default ADD Rule">
| + | |
− | <Condition>Operation='ADD'</Condition>
| + | |
− | <Task>
| + | |
− | <Fetch Filter="only-attributes"/>
| + | |
− | <Send BrokerId="broker1" Queue="SMILA.connectivity"/>
| + | |
− | </Task>
| + | |
− | </Rule>
| + | |
− |
| + | |
− | <Rule Name="Default DELETE Rule">
| + | |
− | <Condition>Operation='DELETE'</Condition>
| + | |
− | <Task>
| + | |
− | <Fetch Filter="no-filter"/>
| + | |
− | <Send BrokerId="broker1" Queue="SMILA.connectivity">
| + | |
− | <SetProperty Name="doSomething">really do something</SetProperty>
| + | |
− | </Send>
| + | |
− | </Task>
| + | |
− | </Rule>
| + | |
− |
| + | |
− | </RouterConfig>
| + | |
− | </source>
| + | |
− | | + | |
− | == Condition ==
| + | |
− | Processing Rule is found by value of Condition tag.
| + | |
− | Condition is a String whose syntax is based on a subset of the SQL92 conditional expression syntax pointed in JMS specification. [[http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html | spec]]
| + | |
− | | + | |
− | For Router it operates with two properties
| + | |
− | * Operation
| + | |
− | * DataSourceID
| + | |
− | | + | |
− | | + | |
− | == Tasks ==
| + | |
− | See [[SMILA/Documentation/QueueWorker/Tasks|Router/Listener Tasks]]
| + | |