From fa606de097fbb43ad6e4d3babc7a5f08337ab004 Mon Sep 17 00:00:00 2001 From: Gunnar Hillert Date: Tue, 1 Nov 2011 18:15:23 -0400 Subject: [PATCH] INT-2215 - Refactor Claim Check Schema Definition --- docs/src/reference/docbook/claim-check.xml | 195 ++++++++++++++++-- .../config/xml/spring-integration-2.1.xsd | 128 ++++++++---- 2 files changed, 263 insertions(+), 60 deletions(-) diff --git a/docs/src/reference/docbook/claim-check.xml b/docs/src/reference/docbook/claim-check.xml index 1f74aab459..e661a34f8f 100644 --- a/docs/src/reference/docbook/claim-check.xml +++ b/docs/src/reference/docbook/claim-check.xml @@ -24,22 +24,33 @@ - Spring Integration provides two types of Claim Check transformers: Incoming Claim Check Transformer and - Outgoing Claim Check Transformer. Convenient namespace-based mechanisms are available to configure them. + Spring Integration provides two types of Claim Check transformers: + + Incoming Claim Check Transformer + Outgoing Claim Check Transformer + + + + Convenient namespace-based mechanisms are available to configure them. + + +
Incoming Claim Check Transformer - An Incoming Claim Check Transformer will transform an incoming Message by storing it in the Message Store - identified by its message-store attribute. + An Incoming Claim Check Transformer will transform an incoming Message by storing it in the Message Store + identified by its message-store attribute. + ]]> + In the above configuration the Message that is received on the input-channel will be persisted to the Message Store identified with the message-store attribute and indexed with generated ID. That ID is the Claim Check for that Message. @@ -51,6 +62,73 @@ manually and get the contents of the Message, or you can use the same approach as before except now you will be transforming the Claim Check to the actual Message by using an Outgoing Claim Check Transformer. + + Here is an overview of all available parameters of an Incoming Claim + Check Transformer: + + ]]> ]]>]]> + + + + + Lifecycle attribute signaling if this component should + be started during Application Context startup. Defaults + to true. Attribute is not available inside a Chain element. + Optional. + + + Id identifying the underlying bean definition (MessageTransformingHandler). + Attribute is not available inside a Chain element. + Optional. + + + The receiving Message channel of this endpoint. + Attribute is not available inside a Chain element. + Optional. + + + Reference to the MessageStore to be used by this Claim + Check transformer. If not specified, the default reference + will be to a bean named messageStore. + Optional. + + + Specifies the order for invocation when this endpoint is + connected as a subscriber to a channel. This is particularly + relevant when that channel is using a failover + dispatching strategy. It has no effect when this endpoint + itself is a Polling Consumer for a channel with a queue. + Attribute is not available inside a Chain element. + Optional. + + + Identifies the Message channel where Message will be sent + after its being processed by this endpoint. + Attribute is not available inside a Chain element. + Optional. + + + Specify the maximum amount of time in milliseconds to wait + when sending a reply Message to the output channel. By default + the send will block for one second. + Attribute is not available inside a Chain element. + Optional. + + + Defines a poller. Element is not available inside + a Chain element. + Optional. + + +
@@ -59,16 +137,96 @@ An Outgoing Claim Check Transformer allows you to transform a Message with a Claim Check payload into a Message with the original content as its payload. + + ]]> + In the above configuration, the Message that is received on the input-channel should have a Claim Check as its payload and the Outgoing Claim Check Transformer will transform it into a Message with the original payload by simply querying the Message store for a Message identified by the provided Claim Check. It then sends the newly checked-out Message to the output-channel. + + + Here is an overview of all available parameters of an Outgoing Claim + Check Transformer: + + ]]> ]]>]]> + + + + + Lifecycle attribute signaling if this component should + be started during Application Context startup. Defaults + to true. Attribute is not available inside a Chain element. + Optional. + + + Id identifying the underlying bean definition (MessageTransformingHandler). + Attribute is not available inside a Chain element. + Optional. + + + The receiving Message channel of this endpoint. + Attribute is not available inside a Chain element. + Optional. + + + Reference to the MessageStore to be used by this Claim + Check transformer. If not specified, the default reference + will be to a bean named messageStore. + Optional. + + + Specifies the order for invocation when this endpoint is + connected as a subscriber to a channel. This is particularly + relevant when that channel is using a failover + dispatching strategy. It has no effect when this endpoint + itself is a Polling Consumer for a channel with a queue. + Attribute is not available inside a Chain element. + Optional. + + + Identifies the Message channel where Message will be sent + after its being processed by this endpoint. + Attribute is not available inside a Chain element. + Optional. + + + If set to true the Message will be removed from the + MessageStore by this transformer. Useful when Message can + be "claimed" only once. Defaults to false. + Optional. + + + Specify the maximum amount of time in milliseconds to wait + when sending a reply Message to the output channel. By default + the send will block for one second. + Attribute is not available inside a Chain element. + Optional. + + + Defines a poller. Element is not available inside + a Chain element. + Optional. + + + + + Claim Once There are scenarios when a particular message must be claimed only once. As an analogy, consider the airplane luggage check-in/out process. @@ -91,20 +249,17 @@ output-channel="output" remove-message="true"/>]]>
- - Although we rarely care about the details of the claim checks as long as they work, it is still worth knowing that - the current implementation of the actual Claim Check (the pointer) in Spring Integration is a UUID to ensure uniqueness. - - - - A word on Message Store - - - org.springframework.integration.store.MessageStore is a strategy interface for storing and retrieving messages. - Spring Integration provides two convenient implementations of it. SimpleMessageStore: an in-memory, Map-based - implementation (the default, good for testing) and JdbcMessageStore: an implementation that uses a relational - database via JDBC. - - - +
+ A word on Message Store + + Although we rarely care about the details of the claim checks as long as they work, it is still worth knowing that + the current implementation of the actual Claim Check (the pointer) in Spring Integration is a UUID to ensure uniqueness. + + + org.springframework.integration.store.MessageStore is a strategy interface for storing and retrieving messages. + Spring Integration provides two convenient implementations of it. SimpleMessageStore: an in-memory, Map-based + implementation (the default, good for testing) and JdbcMessageStore: an implementation that uses a relational + database via JDBC. + +
diff --git a/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.1.xsd b/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.1.xsd index 27c50c3f75..096b65c13a 100644 --- a/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.1.xsd +++ b/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.1.xsd @@ -1235,8 +1235,8 @@ endpoint itself is a Polling Consumer for a channel with a queue. - - + + @@ -1969,51 +1969,96 @@ endpoint itself is a Polling Consumer for a channel with a queue. - + + + - Defines a Transformer that stores a Message and returns a new Message whose - payload is the id of - the stored Message. + Defines a Transformer that stores a Message and returns a new + Message, whose payload is the id of the stored Message. - + + + + + + + + + + + + + + + + + + + - Defines a Transformer that accepts a Message whose payload is a UUID and - retrieves the Message - associated with that id from a MessageStore if - available (else null). + Defines a Transformer that accepts a Message whose payload is a + UUID and retrieves the Message associated with that id from a + MessageStore if available (else null). - - - - - - - If set to 'true' the Message will be removed from the MessageStore by - this transformer. Useful when Message can be 'claimed' only once. DEFAULT is 'false'. - - - - - - - - - - + + + + + + + + + + If set to 'true' the Message will be removed + from the MessageStore by this transformer. + Useful when the Message can be 'claimed' only + once. DEFAULT is 'false'. + + + + + + + + + + + + + + + + + + If set to 'true' the Message will be removed + from the MessageStore by this transformer. + Useful when Message can be 'claimed' only + once. DEFAULT is 'false'. + + + + + + + + + + + - Reference to the MessageStore to be used by this Claim Check transformer. - If not specified, the - default reference will be to a bean named 'messageStore'. + Reference to the MessageStore to be used by this Claim Check + transformer. If not specified, the default reference will be + to a bean named 'messageStore'. @@ -2022,7 +2067,6 @@ endpoint itself is a Polling Consumer for a channel with a queue. - @@ -3423,12 +3467,16 @@ endpoint itself is a Polling Consumer for a channel with a queue. ]]> - - - - Lifecycle attribute signaling if this component should be started during Application Context startup. - - - + + + + Lifecycle attribute signaling if this component should be + started during Application Context startup. Defaults to true. + + + + + + \ No newline at end of file