Author: supun Date: Wed Jun 24 03:01:35 2009 New Revision: 39807 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=39807
Log: Adding mediator guides Added: trunk/esb/java/docs/xdoc/mediators/aggregate.xml trunk/esb/java/docs/xdoc/mediators/cache.xml Added: trunk/esb/java/docs/xdoc/mediators/aggregate.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/mediators/aggregate.xml?pathrev=39807 ============================================================================== --- (empty file) +++ trunk/esb/java/docs/xdoc/mediators/aggregate.xml Wed Jun 24 03:01:35 2009 @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Aggregate Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Aggregate Mediator</h2> + +<p>The aggregate mediator implements the Message Aggregator EIP and will +aggregate the messages or responses for splitted messages using either the +clone or iterate mediators. At the same time it can aggregate messages on the +presence of matching elements specified by the correlateOn XPATH expression. +Aggregate will collect the messages coming into it until the messages collected +on the aggregation satisfies the complete condition. The completion condition +can specify a minimum or maximum number of messages to be collected, or a +timeout value in seconds, after which the aggregation terminates. On completion +of the aggregation it will merge all of the collected messages and invoke the +onComplete sequence on it. The merged message would be created using the XPath +expression specified by the attribute 'expression' on the 'onComplete' element. +</p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <aggregate> + <correlateOn expression="xpath"/>? + <completeCondition [timeout="time-in-seconds"]> + <messageCount min="int-min" max="int-max"/>? + </completeCondition>? + <onComplete expression="xpath" [sequence="sequence-ref"]> + (mediator +)? + </onComplete> + </aggregate></pre> + +<h3>UI Configuration</h3> + +<p>After adding an aggregate mediator, clicking on it will open up the +aggregator specific options below the sequence editor. Figure 2 shows all the +aggregator specific options.</p> + +<div class="image"> +<img src="../aggregate-mediator/docs/images/aggregator-options.png" alt="" /> + +<p>Figure 2: Aggregator specific options </p> +</div> + +<p>Aggregate mediator field descriptions,</p> + +<table border="1"> + <tbody> + <tr> + <td style="font-weight: bold;">Field name</td> + <td style="font-weight: bold;">Description</td> + </tr> + <tr> + <td>Aggregation Expression</td> + <td>An XPath expression specifying based on which elements to aggregate. + Set of messages that's taken for aggregation is determined through + <span style="font-weight: bold;">Correlation Expression </span>. </td> + </tr> + <tr> + <td>Completion Timeout</td> + <td>Time that the aggregator waits for messages.</td> + </tr> + <tr> + <td>Completion Max-messages</td> + <td>Maximum number of messages that can exist in an aggregation. </td> + </tr> + <tr> + <td>Completion Min-messages</td> + <td>Minimum number of messages required for the aggregation to complete. + </td> + </tr> + <tr> + <td>Correlation Expression </td> + <td>An XPath expression specifying the pattern messages will be collected + for aggregation. Specific aggregation condition will be set through + <span style="font-weight: bold;">Aggregation Expression </span>. </td> + </tr> + </tbody> +</table> + +<h3>Example</h3> +</body> +</html> Added: trunk/esb/java/docs/xdoc/mediators/cache.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/mediators/cache.xml?pathrev=39807 ============================================================================== --- (empty file) +++ trunk/esb/java/docs/xdoc/mediators/cache.xml Wed Jun 24 03:01:35 2009 @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Cache Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Cache Mediator</h2> + +<p>Cache mediator checks weather a message is seen before. If the message is +seen before it will execute a specified sequence. </p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <cache [id="string"] [hashGenerator="class"] [timeout="seconds"] [scope=(per-host | per-mediator)] + collector=(true | false) [maxMessageSize="in-bytes"]> + <onCacheHit [sequence="key"]> + (mediator)+ + </onCacheHit>? + <implementation type=(memory | disk) maxSize="int"/> + </cache></pre> + +<p>The cache mediator will evaluate the hash value of an incoming message as +described in the optional hash generator implementation (which should be a +class implementing the org.wso2.caching.digest.DigestGenerator interface). The +default hash generator is 'org.wso2.caching.digest.DOMHashGenerator'. If the +generated hash value has been found in the cache then the cache mediator will +execute the onCacheHit sequence which can be specified inline or referenced. +The cache mediator must be specified with an 'id' and two instances with this +same 'id' that correlates the response message into the cache for the request +message hash. The optional 'timeout' specifies the valid duration for cached +elements, and the scope defines if mediator instances share a common cache per +every host instance, or per every cache mediator pair (i.e. 'id') instance. The +'collector' attribute 'true' specifies that the mediator instance is a response +collection instance, and 'false' specifies that its a cache serving instance. +The maximum size of a message to be cached could be specified with the optional +'maxMessageSize' attributes in bytes and defaults to unlimited. Finally the +'implementation' element may define if the cache is disk or memory based, and +the 'maxSize' attribute defines the maximum number of elements to be cached. +</p> + +<p></p> + +<h3>UI Configuration</h3> +<img src="../cache-mediator/docs/images/cache_mediator_screenshot.jpg" alt="" +/> +<ul> + <li>Cache Id: Id for the cache configuration. You should have same id for a + cache mediator instance in incoming path and the corresponding mediator + instance in outgoing message path. </li> + <li>Cache Scope: Scope of the cache. This is important if the service is + deployed in a cluster. + <ul> + <li>Per-Host: The cache is kept only for the current host in a cluster. + </li> + <li>Per-Mediator: The cache is kept once for the whole cluster. </li> + </ul> + </li> + <li>Cache Type: Whether the mediator is in the incoming path (check request) + or the outgoing path (cache the response). + <ul> + <li>Finder: Set if the message is incoming path. This indicate the + mediator find for the request hash of each incoming message. </li> + <li>Collector: Set if the message is in outgoing path. This indicate the + mediator collect the response message in the cache. </li> + </ul> + </li> + <li>Hash Generator: The logic for finding the hash which check against each + incoming message. Default to org.wso2.caching.digest.DOMHASHGenerator </li> + <li>Cache Timeout: The cache timeout(The time to keep the cache before + expiring) in seconds. </li> + <li>Maximum Message Size: The limit of the message to cache in bytes. </li> + <li>Implementation Type: Currently only "In-Memory" is available. </li> + <li>On Cache Hit: Specify the sequence to follow when the cache mediator is + hit. You can either specify it as anonymous where you can define child + mediators for the Cache mediator or you can refer a named sequence of + mediators from the registry. </li> +</ul> + +<h3>Example</h3> +</body> +</html> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
