Ruwan Linton avatar Ruwan Linton committed fbc101f Merge

Merging the 2.0.0 changes into the alpha branch

Comments (0)

Files changed (400)

+target
 logs
 ultraesb.iml
 ultraesb.iws
 resources/conf/serverid.txt
 resources/tmp
 modules/uconsole/src/main/webapp/.idea
-target
 .settings
 .classpath
 .project

File contents unchanged.

     <target name="javadoc" description="Generate Javadocs">
         <javadoc destdir="resources/docs/javadocs" author="false" doclet="ExcludeDoclet" docletpath="resources/lib/exclude-doclet.jar"
                  footer="Copyright (c) 2010-2012 AdroitLogic Private Ltd. All rights reserved."
-                 header="&lt;b&gt;AdroitLogic UltraESB v2.0.0-pre-alpha1&lt;/b&gt;">
+                 header="&lt;b&gt;AdroitLogic UltraESB v2.0.0-SNAPSHOT&lt;/b&gt;">
             <classpath location="modules/api/src/main/java"/>
             <classpath location="modules/core/src/main/java"/>
             <classpath refid="classpath"/>

modules/api/pom.xml

     <parent>
         <groupId>org.adroitlogic</groupId>
         <artifactId>ultraesb</artifactId>
-        <version>2.0.0-pre-alpha1</version>
+        <version>2.0.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
     <groupId>org.adroitlogic</groupId>
     <artifactId>ultraesb-api</artifactId>
-    <version>2.0.0-pre-alpha1</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>jar</packaging>
     <name>UltraESB - API</name>
     <description>AdroitLogic UltraESB developer API</description>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-tx</artifactId>
-            <version>3.1.0.RELEASE</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+            <optional>true</optional>
         </dependency>
     </dependencies>
 

modules/api/src/main/java/org/adroitlogic/ultraesb/api/ConfigurationConstants.java

         public static final String SOCKET_TIMEOUT               = "ultra.endpoint.socket_timeout";
         /** The time in milli seconds to keep a connection to the endpoint alive */
         public static final String KEEPALIVE_TIMEOUT            = "ultra.endpoint.keepalive_timeout";
-        /** The id of the Spring bean implementing the {@link org.adroitlogic.ultraesb.api.helper.ResponseValidator}
+        /**
+         * The id of the Spring bean implementing the {@link org.adroitlogic.ultraesb.api.helper.ResponseValidator}
          * interface that will decide, if a response should be accepted as valid from this endpoint
          */
         public static final String RESPONSE_VALIDATOR_BEAN      = "ultra.endpoint.response_validator_bean";
+        /**
+         * The name of the class implementing the {@link org.adroitlogic.ultraesb.api.helper.ResponseValidator}
+         * interface that will decide, if a response should be accepted as valid from this endpoint
+         */
+        public static final String RESPONSE_VALIDATOR_CLASS     = "ultra.endpoint.response_validator_class";
     }
 
     public static String MEDIATION_RESPONSE_ENDPOINT_NAME = "mediation.response";

modules/api/src/main/java/org/adroitlogic/ultraesb/api/Mediation.java

 
 import org.adroitlogic.as2.api.AS2Manager;
 import org.adroitlogic.soapbox.api.WSSecurityManager;
-import org.adroitlogic.ultraesb.api.cache.Cache;
 import org.adroitlogic.ultraesb.api.mediation.*;
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
 
 import javax.sql.DataSource;
-import javax.xml.namespace.QName;
 import java.io.IOException;
 import java.sql.Connection;
-import java.text.ParseException;
-import java.util.Date;
-import java.util.Map;
 
 /**
  * Defines the public API for mediation. This interface exposes many convenience functions for
     public void savePayloadToFile(Message m, String filePath) throws IOException;
 
     /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#setPayloadToSOAP11Fault(Message, String, String, String)}
-     *
-     * Set the payload of the current message to a SOAP 1.1 fault message with the given code, faultString and detail
-     * @param m the current message
-     * @param code Local Name of the fault code - See http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383510
-     * (null will default to "Server")
-     * @param faultString fault string, or null (defaults to "General Error")
-     * @param detail fault detail, or null (defaults to "Not available")
-     */
-    @Deprecated
-    public void setPayloadToSOAP11Fault(Message m, String code, String faultString, String detail);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#setPayloadToSOAP12Fault(Message, String, String, String)}
-     *
-     * Set the payload of the current message to a SOAP 1.2 fault message with the given code, reason and detail
-     * @param m the current message
-     * @param code Local Name of the fault code value - See http://www.w3.org/TR/soap12-part1/#faultcodes
-     * (null will default to "Receiver")
-     * @param reason fault reason, or null (defaults to "General Error" if null)
-     * @param detail fault detail, or null (defaults to "Not available")
-     */
-    @Deprecated
-    public void setPayloadToSOAP12Fault(Message m, String code, String reason, String detail);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#isSoap(Message)}
-     *
-     * Check the message content type to see if it indicates a SOAP 1.1 or 1.2 message serialized as XML
-     * @param msg the message to detect
-     * @return true if either SOAP 1.1 or 1.2 is indicated
-     */
-    @Deprecated
-    public boolean isSoap(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapFaultCode(Message)}
-     *
-     * Extract the SOAP 1.1 Fault/faultcode or SOAP 1.2 Fault/Code/Value if exists
-     * @param msg the message to use
-     * @return the fault code if exists
-     */
-    @Deprecated
-    public String getSoapFaultCode(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapFaultString(Message)}
-     *
-     * Extract the SOAP 1.1 Fault/faultstring or SOAP 1.2 Reason/Text if exists
-     * @param msg the message to use
-     * @return the fault code if exists
-     */
-    @Deprecated
-    public String getSoapFaultString(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapFaultDetail(Message)}
-     *
-     * Extract the SOAP 1.1 detail or SOAP 1.2 Detail if exists
-     * @param msg the message to use
-     * @return the fault code if exists
-     */
-    @Deprecated
-    public String getSoapFaultDetail(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapHeaderAsString(Message, String, String)}
-     *
-     * Extract the SOAP 1.1/1.2 header value as a String
-     * @param msg the SOAP message
-     * @param namespace namespace of the header element
-     * @param name the name of the header element
-     * @return the String value of the header
-     */
-    @Deprecated
-    public String getSoapHeaderAsString(Message msg, String namespace, String name);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapHeadersAsStrings(Message)}
-     *
-     * Extract the SOAP 1.1/1.2 header values as a Strings
-     * @param m the SOAP message
-     * @return a Map of QNames and Strings of the text value
-     */
-    @Deprecated
-    public Map<QName, String> getSoapHeadersAsStrings(Message m);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapAddressingTo(Message)}
-     *
-     * Get the WSA To header
-     * @param msg message to extract the header from
-     * @return the header value
-     */
-    @Deprecated
-    public String getSoapAddressingTo(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapAction(Message)}
-     *
-     * Return the SOAPAction transport header
-     * @param msg message to extract the header from
-     * @return the SOAPAction transport header
-     */
-    @Deprecated
-    public String getSoapAction(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapAddressingAction(Message)}
-     *
-     * Get the WSA Action header
-     * @param msg message to extract the header from
-     * @return the header value
-     */
-    @Deprecated
-    public String getSoapAddressingAction(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapAddressingReplyTo(Message)}
-     *
-     * Get the WSA ReplyTo header
-     * @param msg message to extract the header from
-     * @return the header value
-     */
-    @Deprecated
-    public String getSoapAddressingReplyTo(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapAddressingFaultTo(Message)}
-     *
-     * Get the WSA FaultTo header
-     * @param msg message to extract the header from
-     * @return the header value
-     */
-    @Deprecated
-    public String getSoapAddressingFaultTo(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapAddressingFrom(Message)}
-     *
-     * Get the WSA From header
-     * @param msg message to extract the header from
-     * @return the header value
-     */
-    @Deprecated
-    public String getSoapAddressingFrom(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#getSoapAddressingMessageID(Message)}
-     *
-     * Get the WSA MessageID header
-     * @param msg message to extract the header from
-     * @return the header value
-     */
-    @Deprecated
-    public String getSoapAddressingMessageID(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link HTTPSupport#isHessian(Message)}
-     *
-     * Check the message content type to see if it indicates a Hessian message
-     * @param msg the message to detect
-     * @return true if a Hessian message is indicated
-     */
-    @Deprecated
-    public boolean isHessian(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link HTTPSupport#setCookie(Message, String, String, String, String, int, boolean)}
-     *
-     * Set a HTTP cookie on the message
-     * @param msg the response message to set the cookie on
-     * @param name name of the cookie
-     * @param value value of the cookie
-     * @param path the path for the cookie
-     * @param domain the domain for the cookie
-     * @param age the max age for the cookie
-     * @param secure true if cookie is secure
-     */
-    @Deprecated
-    public void setCookie(Message msg, String name, String value, String path, String domain, int age, boolean secure);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link HTTPSupport#setCookie(Message, String, String, String, int)}
-     *
-     * Set a HTTP cookie on the message
-     * @param msg the response message to set the cookie on
-     * @param name name of the cookie
-     * @param value value of the cookie
-     * @param path the path for the cookie
-     * @param age the max age for the cookie
-     */
-    @Deprecated
-    public void setCookie(Message msg, String name, String value, String path, int age);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link HTTPSupport#setCookie(Message, String, String)}
-     *
-     * Set a HTTP cookie on the message
-     * @param msg the response message to set the cookie on
-     * @param name name of the cookie
-     * @param value value of the cookie
-     */
-    @Deprecated
-    public void setCookie(Message msg, String name, String value);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link HTTPSupport#getCookie(Message, String)}
-     *
-     * Return the value of the cookie with the given name
-     * @param msg message to extract cookie from
-     * @param name the name of the cookie
-     * @return the value of the cookie
-     */
-    @Deprecated
-    public String getCookie(Message msg, String name);
-
-    /**
      * Trigger off sending the current payload as a synchronous response message for the currently processing message
      * If the response for the message has already been submitted, any duplicates calls are silently ignored
      * @param msg the message to be sent as the response
     public void dropMessage(Message m);
 
     /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#convertFromFI(Message)} or
-     *                                     {@link SOAPSupport#convertFromFI(Message)}
-     *
-     * Convert the payload of the current message from a FastInfoset binary to an XML message
-     * (Note the XML payload is still kept as a RawFileMessage by default and maybe converted into a DOM message if required)
-     * @param m the current message to be transformed
-     */
-    @Deprecated
-    public void convertFromFI(Message m);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#convertToFI(Message)} or
-     *                                     {@link SOAPSupport#convertToFI(Message)}
-     *
-     * Convert the XML message into a FastInfoset binary message
-     * @param m the current message to be transformed
-     */
-    @Deprecated
-    public void convertToFI(Message m);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#convertToDOM(Message)}
-     *
-     * Convert the current message into a DOMMessage
-     * @param m the current message to be transformed
-     */
-    @Deprecated
-    public void convertToDOM(Message m);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#convertXMLToJSONStream(Message)} or
-     *                                     {@link JSONSupport#convertXMLToJSONStream(Message)}
-     *
-     * Convert the current XML message payload (which maybe available as any format such as raw file or DOM etc)
-     * into a file based JSON stream
-     * @param m the message to be converted
-     */
-    @Deprecated
-    public void convertXMLToJSONStream(org.adroitlogic.ultraesb.api.Message m);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link JSONSupport#convertJSONToStream(Message, Object)}
-     *
-     * Convert an untyped Object (e.g. Map holding a JSON payload) to a streamed (file based) message
-     * @param m current message to hold final stream
-     * @param o untyped object to conver to JSON
-     */
-    @Deprecated
-    public void convertJSONToStream(org.adroitlogic.ultraesb.api.Message m, Object o);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#convertSOAPToJSONStream(Message)} or
-     *                                     {@link JSONSupport#convertSOAPToJSONStream(Message)}
-     *
-     * Convert the current SOAP message payload (which maybe available as any format such as raw file or DOM etc)
-     * into a file based JSON stream
-     * @param m the message to be converted
-     */
-    @Deprecated
-    public void convertSOAPToJSONStream(org.adroitlogic.ultraesb.api.Message m);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#convertXMLToJSONStream(Message, javax.xml.namespace.QName, boolean)} or
-     *                                     {@link JSONSupport#convertXMLToJSONStream(Message, javax.xml.namespace.QName, boolean)}
-     *
-     * Convert the current XML message payload (which maybe available as any format such as raw file or DOM etc)
-     * into a file based JSON stream
-     * @param m the message to be converted
-     * @param staringElement an optional starting element to begin conversion (e.g. first element of the SOAP body)
-     * @param  retainNSPrefixes retain the namespace prefixes into JSON names for elements
-     */
-    @Deprecated
-    public void convertXMLToJSONStream(org.adroitlogic.ultraesb.api.Message m,
-        QName staringElement, boolean retainNSPrefixes);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#convertSOAPToJSONStream(Message, javax.xml.namespace.QName, boolean)}  or
-     *                                     {@link JSONSupport#convertSOAPToJSONStream(Message, javax.xml.namespace.QName, boolean)}
-     *
-     * Convert the current SOAP message payload (which maybe available as any format such as raw file or DOM etc)
-     * into a file based JSON stream
-     * @param m the message to be converted
-     * @param staringElement an optional starting element to begin conversion (e.g. first element of the SOAP body)
-     * @param  retainNSPrefixes retain the namespace prefixes into JSON names for elements
-     */
-    @Deprecated
-    public void convertSOAPToJSONStream(org.adroitlogic.ultraesb.api.Message m,
-        QName staringElement, boolean retainNSPrefixes);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link JSONSupport#convertToUntypedJSON(Message)}
-     *
-     * Convert the current message into an untyped JSON MapMessage
-     * @param m the current message to be transformed
-     * @return an untyped Map<String, Object> created using the Jackson JSON parser
-     */
-    @Deprecated
-    public Map<String, Object> convertToUntypedJSON(Message m);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link JSONSupport#convertToTypedJSON(Message, Class)}
-     *
-     * Convert the current message into a Typed JSON Object
-     * @param m the current message to be transformed
-     * @param clazz the class of the return message
-     * @return the Object instance of the JSON message
-     */
-    @Deprecated
-    public <T> T convertToTypedJSON(org.adroitlogic.ultraesb.api.Message m, Class<? extends T> clazz);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#validate(Message, String[], String, String[][])} or
-     *                                     {@link XMLSupport#validate(Message, String[], String, String[][])}
-     *
-     * Validate the current message - or an element of it selected via an XPath expression - against one or more schemas
-     * @param m the message holding the payload for validation
-     * @param schemas an array of XSD filename to validate against.
-     * Note: the validator is sensitive to the order in which the Schemas are given. Otherwise you may end up with
-     * an error such as "SAXParseException: cvc-elt.1: Cannot find the declaration of element"
-     * @param exprn an optional XPath expression selecting the node for validation
-     * @param ns an optional array of namespace prefixes and namespaces used within the XPath expression
-     */
-    @Deprecated
-    public void validate(Message m, String[] schemas, String exprn, final String[][] ns);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#validate(Message, String[])} or
-     *                                     {@link XMLSupport#validate(Message, String[])}
-     *
-     * Validate the current message against one or more schemas
-     * @param m the message holding the payload for validation
-     * @param schemas an array of XSD filename to validate against
-     * Note: the validator is sensitive to the order in which the Schemas are given. Otherwise you may end up with
-     * an error such as "SAXParseException: cvc-elt.1: Cannot find the declaration of element"
-     */
-    @Deprecated
-    public void validate(Message m, String[] schemas);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link SOAPSupport#validate(Message, String)} or
-     *                                     {@link XMLSupport#validate(Message, String)}
-     *
-     * Validate the current message against one single schema
-     * @param m the message holding the payload for validation
-     * @param schema a XSD filename to validate against
-     */
-    @Deprecated
-    public void validate(Message m, String schema);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#filter(Message, String, String[][], String)} or
-     *                                     {@link SOAPSupport#filter(Message, String, String[][], String)}
-     *
-     * Evaluate the given XPath expression over the XML payload and compare the resulting String value with the
-     * regular expression for a match. This method converts the current payload into a DOMMessage
-     * @param m the current message
-     * @param exprn the XPath expression to evaluate against the message payload
-     * @param ns an optional array of namespace prefixes and namespace urls
-     * @param regex an optional regular expression to evaluate the XPath results' String value against
-     * @return true if the regular expression matches the String result of the XPath expression
-     */
-    @Deprecated
-    public boolean filter(Message m, String exprn, final String[][] ns, String regex);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#filter(Message, String, String[][])} or
-     *                                     {@link SOAPSupport#filter(Message, String, String[][])}
-     *
-     * Evaluate the given boolean XPath expression over the XML payload
-     * @param m the current message
-     * @param exprn the XPath expression to evaluate against the message payload
-     * @param ns an optional array of namespace prefixes and namespace urls
-     * @return true if the XPath expression evaluates to true
-     */
-    @Deprecated
-    public boolean filter(Message m, String exprn, final String[][] ns);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#remove(Message, String, String[][])} or
-     *                                     {@link SOAPSupport#remove(Message, String, String[][])}
-     *
-     * Remove the XPath expression specified node from the XML payload. This method converts the current payload of the
-     * message into a DOMMessage
-     * @param m the current message
-     * @param exprn the XPath expression to evaluate against the message payload
-     * @param ns an optional array of namespace prefixes and namespace urls
-     * @return true if the node was removed, false if not
-     */
-    @Deprecated
-    public boolean remove(Message m, String exprn, final String[][] ns);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#extractAsStringUsingXPath(Message, String, String[][])} or
-     *                                     {@link SOAPSupport#extractAsStringUsingXPath(Message, String, String[][])}
-     *
-     * Evaluate the given XPath expression against the XML payload, and return result as a String
-     * This method converts the current payload into a DOMMessage
-     * @param m the current message
-     * @param exprn the XPath expression to evaluate against the message payload
-     * @param ns an optional array of namespace prefixes and namespace urls
-     * @return the result of the XPath expression as a String, or null
-     */
-    @Deprecated
-    public String extractAsStringUsingXPath(Message m, String exprn, final String[][] ns);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#extractAsNodeListUsingXPath(Message, String, String[][])}
-     *
-     * Evaluate the given XPath expression against the XML payload, and return result as a NodeList
-     * This method converts the current payload into a DOMMessage
-     * @param m the current message
-     * @param exprn the XPath expression to evaluate against the message payload
-     * @param ns an optional array of namespace prefixes and namespace urls
-     * @return the result of the XPath expression as a NodeList, or null
-     */
-    @Deprecated
-    public NodeList extractAsNodeListUsingXPath(Message m, String exprn, final String[][] ns);
-
-    /**
      * Send the current message to the endpoint with the given name. This stops the message from being processed by the
      * default destination endpoint after the in/out sequence completes (i.e. marked as 'Dropped')
      * @param m the current name
     public void sendToEndpoint(Message m, String endpointName);
 
     /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#transform(Message, String, String, String[][], boolean, java.util.Map)} or
-     *                                     {@link SOAPSupport#transform(Message, String, String, String[][], boolean, java.util.Map)}
-     *
-     * Transform the message payload by XSLT
-     * @param msg current message
-     * @param xsltFilename the XSLT filename
-     * @param exprn an optional XPath expression to select the source node for XSLT, and node to replace with the result
-     * @param ns an optional array of namespace prefixes and namespace urls
-     * @param domResult is the result desired as a DOM payload? (useful for further XML processing)
-     * @param parameters any XSLT parameters to be passed to the transformation
-     */
-    @Deprecated
-    public void transform(Message msg, final String xsltFilename, String exprn, final String[][] ns,
-        boolean domResult, Map<String, Object> parameters);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#transform(Message, String, String, String[][])}
-     *                                     {@link SOAPSupport#transform(Message, String, String, String[][])}
-     *
-     * Transform the message payload by XSLT (without any parameters), assuming a non DOM result
-     * @param msg current message
-     * @param xsltFilename the XSLT filename
-     * @param exprn an optional XPath expression to select the source node for XSLT, and node to replace with the result
-     * @param ns an optional array of namespace prefixes and namespace urls
-     */
-    @Deprecated
-    public void transform(Message msg, final String xsltFilename, String exprn, final String[][] ns);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#transform(Message, String)}
-     *                                     {@link SOAPSupport#transform(Message, String)}
-     *
-     * Transform the message payload by XSLT (without any parameters), assuming a non DOM result and assuming that the
-     * complete message payload will be used as the source of the transformation, and the result will replace the
-     * complete message payload
-     * @param msg current message
-     * @param xsltFilename the XSLT filename
-     */
-    @Deprecated
-    public void transform(Message msg, final String xsltFilename);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#retainElementAsPayload(Message, String, String[][])}
-     *
-     * Replace the current XML payload with the resulting element from the XPath expression result
-     * @param m the current message
-     * @param exprn XPath expression selecting the node to retain
-     * @param ns optional namespaces array
-     */
-    @Deprecated
-    public void retainElementAsPayload(Message m, String exprn, final String[][] ns);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#mergeXMLAttachmentsUnderElement(Message, String)}
-     *
-     * Replace the current XML payload with a top level element as specified, and merge the payloads
-     * from the current body, and attachments underneath that
-     * @param msg the message to transform
-     * @param rootElemName the new root element created
-     */
-    @Deprecated
-    public void mergeXMLAttachmentsUnderElement(Message msg, String rootElemName);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#mergeXMLAttachmentsUnderElement(Message, String, String)}
-     *
-     * Replace the current XML payload with a top level element as specified, and merge the payloads
-     * from the current body, and attachments underneath that
-     * @param msg the message to transform
-     * @param rootElemName the new root element created
-     * @param rootNS optional namespace for the root element, or null
-     */
-    @Deprecated
-    public void mergeXMLAttachmentsUnderElement(Message msg, String rootElemName, String rootNS);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link HTTPSupport#addPreemptiveBasicAuthentication(Message, String, String, String, boolean)}
-     *
-     * Adds an HTTP transport header for pre-emptive basic authentication for this message.
-     * Note: Pre-emptive basic authentication will perform better than basic authentication after an initial
-     * request fails with an HTTP 401 authentication required response. However, basic authentication will
-     * not be secure as digest authentication or other such mechanisms. It is reccomended that basic authentication
-     * if used, should be over an SSL secured connection - in which case the authentication security would be
-     * acceptable
-     * @param msg the message to add an HTTP 'Authorization' header for basic authentication
-     * @param username the username
-     * @param password the password
-     * @param charset the character set for the credentials
-     * @param proxy if header should be for proxy authentication or WWW authentication
-     */
-    @Deprecated
-    public void addPreemptiveBasicAuthentication(Message msg, String username, String password, String charset, boolean proxy);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link HTTPSupport#addPreemptiveBasicAuthentication(Message, String, String)}
-     *
-     * Adds an HTTP transport header for pre-emptive basic authentication for this message.
-     * Note: Pre-emptive basic authentication will perform better than basic authentication after an initial
-     * request fails with an HTTP 401 authentication required response. However, basic authentication will
-     * not be secure as digest authentication or other such mechanisms. It is reccomended that basic authentication
-     * if used, should be over an SSL secured connection - in which case the authentication security would be
-     * acceptable
-     * @param msg the message to add an HTTP 'Authorization' header for basic authentication
-     * @param username the username in US-ASCII character set
-     * @param password the password in US-ASCII character set
-     */
-    @Deprecated
-    public void addPreemptiveBasicAuthentication(Message msg, String username, String password);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link HTTPSupport#getJvmRoute(Message)}
-     *
-     * Return the jvmRoute from the JSESSIONID cookie or jsessionid URL parameter of an HTTP/S request
-     * @param msg the current message
-     * @return the Tomcat jvmRoute from the session
-     */
-    @Deprecated
-    public String getJvmRoute(Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#splitAndProcess(Message, String, String[][], String, boolean)} or
-     *                                     {@link SOAPSupport#splitAndProcess(Message, String, String[][], String, boolean)}
-     *
-     * Split current message into multiple messages using the given XPath expression, and hand over each such
-     * message to the given sequence
-     * @param msg the current message to be split and processed
-     * @param exprn the XPath expression to split the message at
-     * @param ns name spaces used
-     * @param sequenceName the sequence to invoke on each resulting message
-     * @param ignoreErrors ignore any errors encountered during sequence execution
-     * @throws Exception if the invoked sequence throws an exception
-     */
-    @Deprecated
-    public void splitAndProcess(Message msg, String exprn, final String[][] ns, String sequenceName, boolean ignoreErrors) throws Exception;
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link JSONSupport#processBasicJSONDataServiceRequest(Message, String, String)}
-     *
-     * Process request message as a basic JSON data service request. The response would be generated by executing the
-     * specified queries of the JSON Data Service bean definition
-     * @param msg the request message
-     * @param dataSvcBeanName the name of the bean defining the JSON data service
-     * @param dataSourceName the name of the data source bean
-     * @throws Exception on an error
-     */
-    @Deprecated
-    public void processBasicJSONDataServiceRequest(Message msg, String dataSvcBeanName, String dataSourceName) throws Exception;
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XMLSupport#createDOMDocument()}
-     *
-     * Create a new DOM Document object and return
-     * @return a new DOM Document
-     */
-    @Deprecated
-    public Document createDOMDocument();
-
-    /**
      * Invoke another sequence from within a sequence
      * @param msg the current message to be passed to the invoked sequence
      * @param sequenceName the name of the invoked sequence
     public void invokeSequence(Message msg, String sequenceName) throws Exception;
 
     /**
-     * @deprecated From v1.7,0 replaced by {@link XACMLSupport#isPermitted(String, Message)}
-     *
-     * Is message allowed permission by the XACML processor bean selected. Automatically maps the following HTTP
-     * related transport properties to the specified attribute names
-     *
-     * action-id -> msg.getMessageProperty(HttpConstants.METHOD)
-     * subject-id -> msg.getMessageProperty(HttpConstants.USERNAME)
-     * role -> msg.getMessageProperty(HttpConstants.USERROLES) as a String[]
-     * client-dn -> msg.getMessageProperty(HttpConstants.SSL_CLIENT_DN)
-     * resource-id -> msg.getMessageProperty(HttpConstants.SERVICE_URL)
-     *
-     * @param xacmlBeanId the bean Id of the XACML Processor
-     * @param msg the current message
-     * @return true if message is allowed permission
-     */
-    @Deprecated
-    public boolean isPermitted(String xacmlBeanId, Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XACMLSupport#isPermitted(String, java.util.Map)}
-     * Is message allowed permission by the XACML processor bean selected.
-     *
-     * @param xacmlBeanId the bean Id of the XACML Processor
-     * @param custom a Map<String, Object> map of attribute values keyed as per the XACML Processor bean configuration
-     * @return true if message is allowed permission
-     */
-    @Deprecated
-    public boolean isPermitted(String xacmlBeanId, Map<String, Object> custom);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link XACMLSupport#isPermitted(String, String, java.util.Map, Message)}
-     *
-     * Is message allowed permission by the XACML processor bean selected.
-     *
-     * @param xacmlBeanId the bean Id of the XACML Processor
-     * @param issuer an optional issuer field, or null
-     * @param custom a Map<String, Object> map of attribute values keyed as per the XACML Processor bean configuration
-     * @param msg the current message to extract attribute values - if message properties are keyed as per the
-     * XACML Processor bean configuration
-     * @return true if message is allowed permission
-     */
-    @Deprecated
-    public boolean isPermitted(String xacmlBeanId, String issuer, Map<String, Object> custom, Message msg);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link DateSupport#getISO8601FormattedString(java.util.Date)}
-     *
-     * Returns an ISO8601 compliant date string as yyyy-MM-dd
-     * @param date   A java.util.Date object
-     * @return  the formatted String as yyyy-MM-dd
-     */
-    @Deprecated
-    public String getISO8601FormattedString(Date date);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link DateSupport#getDateFromISO8601String(String)}
-     *
-     * Returns a java.util.Date from an ISO8601 compliant date string yyyy-MM-dd
-     * @param s String formatted in yyyy-MM-dd
-     * @return  date
-     * @throws java.text.ParseException if the date string is not parsable as ISO 8601
-     */
-    @Deprecated
-    public Date getDateFromISO8601String(String s) throws ParseException;
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link DateSupport#getSQLDateFromISO8601String(String)}
-     *
-     * Returns a java.sql.Date from an ISO8601 compliant date string yyyy-MM-dd
-     * @param s String formatted in yyyy-MM-dd
-     * @return  date
-     * @throws ParseException if the date string is not parsable as ISO 8601
-     */
-    @Deprecated
-    public java.sql.Date getSQLDateFromISO8601String(String s) throws ParseException;
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link DateSupport#getUTFFormattedString(java.util.Date)}
-     *
-     * Returns a UTC formatted date string as yyyy-MM-dd'T'HH:mm:ss'Z'
-     * @param date A java.util.Date object
-     * @return  the formatted String as yyyy-MM-dd'T'HH:mm:ss'Z'
-     */
-    @Deprecated
-    public String getUTFFormattedString(Date date);
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link DateSupport#getDateFromUTCString(String)}
-     *
-     * Returns a java.util.Date from a UTC date string of the form yyyy-MM-dd'T'HH:mm:ss'Z'
-     * @param s String formatted as yyyy-MM-dd'T'HH:mm:ss'Z'
-     * @return the extracted Date
-     * @throws ParseException if the date string is not parsable as ISO 8601
-     */
-    @Deprecated
-    public Date getDateFromUTCString(String s) throws ParseException;
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link DateSupport#getSQLDateFromUTCString(String)}
-     *
-     * Returns a java.sql.Date from a UTC date string of the form yyyy-MM-dd'T'HH:mm:ss'Z'
-     * @param s String formatted as yyyy-MM-dd'T'HH:mm:ss'Z'
-     * @return the extracted Date
-     * @throws ParseException if the date string is not parsable as ISO 8601
-     */
-    @Deprecated
-    public java.sql.Date getSQLDateFromUTCString(String s) throws ParseException;
-
-    /**
      * Get the Spring bean with the given ID from the [Spring] configuration
      * @param id the ID of the Spring bean to return
      * @return the Spring bean with the given ID
     public WSSecurityManager getWSSecurityManager();
 
     /**
-     * @deprecated From v1.7,0 replaced by {@link CachingSupport#getLocalCache()}
-     *
-     * Gets the {@link Cache} instance which is available locally in the node, and expires it's
-     * entries in a given time. It also has a time to live and nothing is guaranteed to be present
-     * in this cache. If you need your content to be present through out the session, use the
-     * {@link #getLocalPermanentCache()} to get the cache which will give you the permanent cache.</p>
-     *
-     * <p>This cache overflows the content to disk in case of exceeding the in-memory cache size,
-     * which defaults to 10000 entries. How ever after storing another 1000 entries in the disk, the
-     * cache will permanently overflow, which sniffs something wrong in your mediation, as the
-     * content in this cache is automatically cleared in the expiration time.
-     *
-     * @return local cache with a expiration time for all the entries in it
-     */
-    @Deprecated
-    public Cache getLocalCache();
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link CachingSupport#getLocalPermanentCache()}
-     *
-     * Gets the {@link Cache} instance which is available locally in the node, and keeps its
-     * contents in the cache within a session. The contents in this cache will never be expired but
-     * they are not persisted, so they will be lost at a System/JVM restart. If you want content to
-     * be available across JVM sessions, use {@link #getLocalPersistentCache()} instead.</p>
-     *
-     * <p>You should be using this with care, as the content life cycle is not managed by the cache
-     * it is your responsibility to manage the cache content life cycle. Otherwise you might get
-     * into a resource exhaustion. This cache overflows the content to disk in case of exceeding the
-     * in-memory cache size, which defaults to 1000 entries, while there is no limit to the content
-     * which will be overflowed to disk
-     *
-     * @return local cache with a content life time which is equal to the session up time
-     */
-    @Deprecated
-    public Cache getLocalPermanentCache();
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link CachingSupport#getLocalPersistentCache()}
-     *
-     * Gets the {@link Cache} instance which is available locally in the node, and keeps its
-     * contents in the cache forever across the sessions. In other words the content will be
-     * persisted to the disk.</p>
-     *
-     * <p>Once again you should be extra careful about the usage, as the content will be there
-     * even after a system/JVM restart. It is possible to crash the disk space and the data
-     * persisted in the disk be lost and the cache is not handling that case as it really cannot do
-     * anything for the data corruption. This cache by default keeps only 100 entries in-memory and
-     * it off-loads the content to disk and loads the content from disk depending on the demand for
-     * those entries.</p>
-     *
-     * <p>You could treat this as a NO-SQL persistent store, available locally in your node. If you
-     * want the content to be available among the cluster in the case of a clustered deployment, use
-     * the {@link #getDistributedPersistentCache()}
-     *
-     * @return local cache which persists the content into the disk
-     */
-    @Deprecated
-    public Cache getLocalPersistentCache();
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link CachingSupport#getDistributedCache()}
-     *
-     * Applicable only when the clustering is enabled and deployed as a cluster. Characteristics of
-     * the cache returned by this method is equal to the cache that of {@link #getLocalCache()} but
-     * this replicates the content across the nodes in the cluster.</p>
-     *
-     * <p>Not like the local equivalent to which you can put any thing, this only accepts
-     * {@link java.io.Serializable} content as both key and value of the entries in the cache. This
-     * is because the content you put has to be serialized as the cache needs to replicate the
-     * content using RMI.</p>
-     *
-     * <p>If the node is starting up later in the cluster, (i.e. it joins a cluster with a state)
-     * the node bootstraps the cache content from one of its arbitrarily selected peers.
-     *
-     * @return distributed cache with a expiration time for all the entries in it
-     */
-    @Deprecated
-    public Cache getDistributedCache();
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link CachingSupport#getDistributedPermanentCache()}
-     *
-     * Applicable only when the clustering is enabled and deployed as a cluster. Characteristics of
-     * the cache returned by this method is equal to the cache that of
-     * {@link #getLocalPermanentCache()} but this replicates the content across the nodes in the
-     * cluster.</p>
-     *
-     * <p>Not like the local equivalent to which you can put any thing, this only accepts
-     * {@link java.io.Serializable} content as both key and value of the entries in the cache. This
-     * is because the content you put has to be serialized as the cache needs to replicate the
-     * content using RMI.</p>
-     *
-     * <p>You should take extra care about the content life cycle, as the cache doesn't expire the
-     * entries that you put. If the node is starting up later in the cluster, (i.e. it joins a
-     * cluster with a state) the node bootstraps the cache content from one of its arbitrarily
-     * selected peers. Because of the above bootstrap, not like in the local equivalent unless the
-     * complete cluster goes off the content will be preserved even on a System/JVM restart on a
-     * single node, as it will bootstrap it's cache content from a peer in the cluster.
-     *
-     * @return distributed cache with a content life time which is equal to the cluster up time
-     */
-    @Deprecated
-    public Cache getDistributedPermanentCache();
-
-    /**
-     * @deprecated From v1.7,0 replaced by {@link CachingSupport#getDistributedPersistentCache()}
-     *
-     * Applicable only when the clustering is enabled and deployed as a cluster. Characteristics of
-     * the cache returned by this method is equal to the cache that of
-     * {@link #getLocalPersistentCache()} but this replicates the content across the nodes in the
-     * cluster.</p>
-     *
-     * <p>Not like the local equivalent to which you can put any thing, this only accepts
-     * {@link java.io.Serializable} content as both key and value of the entries in the cache. This
-     * is because the content you put has to be serialized as the cache needs to replicate the
-     * content using RMI.</p>
-     *
-     * <p>You should take extra care about the content life cycle, as the cache doesn't expire the
-     * entries that you put. If the node is starting up later in the cluster, (i.e. it joins a
-     * cluster with a state) the node bootstraps the cache content from one of its arbitrarily
-     * selected peers.
-     *
-     * @return distributed cache which persists the content into the local disk
-     */
-    @Deprecated
-    public Cache getDistributedPersistentCache();
-
-    /**
      * Gives the implementation of the {@link ThrottleSupport} defined in the UltraESB
      * configuration with the given bean identifier.</p>
      *
     public SOAPSupport getSOAPSupport();
 
     /**
+     * Access FastInfoset support API
+     * @return the FastInfoset support for mediation
+     */
+    public FastInfosetSupport getFastInfosetSupport();
+
+    /**
      * Access JSON support API
      * @return the JSON support for mediation
      */
     public XACMLSupport getXACMLSupport();
 
     /**
+     * Access JAXB support API
+     * @return the JAXB support for mediation
+     */
+    public JAXBSupport getJAXBSupport();
+
+    /**
      * Access Protocol Buffer support API
      * @return the Protocol Buffer support for mediation
      */

modules/api/src/main/java/org/adroitlogic/ultraesb/api/interceptor/Event.java

+/*
+ * AdroitLogic UltraESB Enterprise Service Bus
+ *
+ * Copyright (c) 2010-2012 AdroitLogic Private Ltd. (http://adroitlogic.org). All Rights Reserved.
+ *
+ * GNU Affero General Public License Usage
+ *
+ * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+ * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License along with this program (See LICENSE.AGPL).
+ * If not, see http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * Commercial Usage
+ *
+ * Licensees holding valid UltraESB Commercial licenses may use this file in accordance with the UltraESB Commercial
+ * License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written
+ * agreement between you and AdroitLogic.
+ *
+ * If you are unsure which license is appropriate for your use, or have questions regarding the use of this file,
+ * please contact AdroitLogic at info@adroitlogic.com
+ */
+
+package org.adroitlogic.ultraesb.api.interceptor;
+
+/**
+ * Base class for all the events created by any of the interception
+ *
+ * @author Ruwan
+ * @since 2.0.0
+ */
+@SuppressWarnings("UnusedDeclaration")
+public abstract class Event {
+
+    protected String subject;
+    protected final long createdAt = System.currentTimeMillis();
+
+    /**
+     * Creates an interceptor event with the given subject and the current time as the creation time
+     *
+     * @param subject the subject of the event
+     */
+    protected Event(String subject) {
+        this.subject = subject;
+    }
+
+    /**
+     * Gets the subject of the interceptor event
+     *
+     * @return the subject
+     */
+    public String getSubject() {
+        return subject;
+    }
+
+    /**
+     * Gets the creation time as a long value of the interceptor event
+     *
+     * @return the creation time
+     */
+    public long getCreatedAt() {
+        return createdAt;
+    }
+}

modules/api/src/main/java/org/adroitlogic/ultraesb/api/interceptor/message/AbstractMessageInterceptor.java

+/*
+ * AdroitLogic UltraESB Enterprise Service Bus
+ *
+ * Copyright (c) 2010-2012 AdroitLogic Private Ltd. (http://adroitlogic.org). All Rights Reserved.
+ *
+ * GNU Affero General Public License Usage
+ *
+ * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+ * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License along with this program (See LICENSE.AGPL).
+ * If not, see http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * Commercial Usage
+ *
+ * Licensees holding valid UltraESB Commercial licenses may use this file in accordance with the UltraESB Commercial
+ * License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written
+ * agreement between you and AdroitLogic.
+ *
+ * If you are unsure which license is appropriate for your use, or have questions regarding the use of this file,
+ * please contact AdroitLogic at info@adroitlogic.com
+ */
+
+package org.adroitlogic.ultraesb.api.interceptor.message;
+
+import org.adroitlogic.ultraesb.api.Mediation;
+import org.adroitlogic.ultraesb.api.Message;
+
+import java.util.Map;
+
+/**
+ * Extend this class and annotate your class with one or more of the following annotations to write any interceptors
+ * for the UltraESB message processing flows. If the interceptors
+ * {@link #intercept(MessageEvent)} method returns false the engine will
+ * discard the message and will not either be further intercepted nor processed.</p>
+ *
+ * <p>The available annotations are;
+ * <ul>
+ *     <li>{@link OnRequest} - on a request received event in the message flow</li>
+ *     <li>{@link OnResponse} - on a response received event in the message flow</li>
+ *     <li>{@link BeforeSequence} - before starting the processing of a sequence in the message flow</li>
+ *     <li>{@link AfterSequence} - after finishing the processing of a sequence in the message flow</li>
+ *     <li>{@link BeforeEndpoint} - before starting the processing of an endpoint in the message flow</li>
+ *     <li>{@link AfterSequence} - after finishing the processing of an endpoint in the message flow</li>
+ * </ul>
+ *
+ * @author Ruwan
+ * @since 2.0.0
+ */
+@SuppressWarnings("UnusedDeclaration")
+public abstract class AbstractMessageInterceptor {
+
+    /**
+     * Intercepts the message at the point defined by the interceptor annotations
+     * @param event the message event which is intercepted
+     * @return if boolean false is returned the message will be discarded and wont be further processed
+     */
+    public abstract boolean intercept(MessageEvent event);
+
+    /**
+     * Sends the response back to the client and it is expected to drop the message and hence the interceptor logic
+     * should return false if this method is invoked by the interceptor. This method creates a new response message
+     * to be sent back if the current message is a request message. If it is a response message it uses the same
+     * message to deliver the response back to the client
+     * @param code status code of the response, in the case of HTTP the HTTP_SC, for example 500, 404, 200, 401 etc..
+     * @param content the message body content
+     * @param message current message received by the interceptor in the {@link MessageEvent}
+     * @param headers the transport level headers to be attached to the response
+     */
+    public void sendResponse(int code, String content, Message message, Map<String, String> headers) {
+
+        Mediation mediation = message.getMediation();
+        Message responseMessage = message.isRequest() ? message.createDefaultResponseMessage() : message;
+        if (headers != null && !headers.isEmpty()) {
+            for (Map.Entry<String, String> header : headers.entrySet()) {
+                responseMessage.addTransportHeader(header.getKey(), header.getValue());
+            }
+        }
+        if (content != null) {
+            mediation.setPayloadFromString(responseMessage, content);
+        }
+        mediation.sendResponseAndDrop(responseMessage, code);
+    }
+}

modules/api/src/main/java/org/adroitlogic/ultraesb/api/interceptor/message/AfterEndpoint.java

+/*
+ * AdroitLogic UltraESB Enterprise Service Bus
+ *
+ * Copyright (c) 2010-2012 AdroitLogic Private Ltd. (http://adroitlogic.org). All Rights Reserved.
+ *
+ * GNU Affero General Public License Usage
+ *
+ * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+ * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License along with this program (See LICENSE.AGPL).
+ * If not, see http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * Commercial Usage
+ *
+ * Licensees holding valid UltraESB Commercial licenses may use this file in accordance with the UltraESB Commercial
+ * License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written
+ * agreement between you and AdroitLogic.
+ *
+ * If you are unsure which license is appropriate for your use, or have questions regarding the use of this file,
+ * please contact AdroitLogic at info@adroitlogic.com
+ */
+
+package org.adroitlogic.ultraesb.api.interceptor.message;
+
+import java.lang.annotation.*;
+
+/**
+ * Use this annotation to annotate a {@link AbstractMessageInterceptor} with the endpoint, proxy, transport and flow type filter
+ * criteria to be used when registering the interceptor. Use the order attribute to order all the after-endpoint
+ * interceptors globally.
+ *
+ * @author Ruwan
+ * @since 2.0.0
+ */
+@Documented
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AfterEndpoint {
+
+    int order() default 0;
+    String endpoint() default ".*";
+    String proxy() default ".*";
+    String transport() default ".*";
+    FlowType flow() default FlowType.ALL;
+}

modules/api/src/main/java/org/adroitlogic/ultraesb/api/interceptor/message/AfterSequence.java

+/*
+ * AdroitLogic UltraESB Enterprise Service Bus
+ *
+ * Copyright (c) 2010-2012 AdroitLogic Private Ltd. (http://adroitlogic.org). All Rights Reserved.
+ *
+ * GNU Affero General Public License Usage
+ *
+ * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+ * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License along with this program (See LICENSE.AGPL).
+ * If not, see http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * Commercial Usage
+ *
+ * Licensees holding valid UltraESB Commercial licenses may use this file in accordance with the UltraESB Commercial
+ * License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written
+ * agreement between you and AdroitLogic.