| Namespace | http://www.mulesoft.org/schema/mule/crc32 |
|---|---|
| Schema Location | http://www.mulesoft.org/schema/mule/crc32/current/mule-crc32.xsd (View Schema) |
| Schema Version | 1.0 |
| Minimum Mule Version | 3.2 |
A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. CRCs are specifically designed to protect against common types of errors on communication channels, where they can provide quick and reasonable assurance of the integrity of messages delivered.
| Configuration | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Configure an instance of this module
| |||||||||||
| Message Processors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Calculates the CRC32 checksum for the given input and stores that value
in the targetExpression defined in this#targetExpression
To calculate the checksum on the input, it's going to transform it to a byte array by invoking the
toByteArray on the object, if one exists, or by serializing it.
| |||||||||||
Filters objects with a different checksum than the expected one.
| |||||||||||
To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:crc32="http://www.mulesoft.org/schema/mule/crc32"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/crc32
http://www.mulesoft.org/schema/mule/crc32/current/mule-crc32.xsd">
<!-- here goes your flows and configuration elements -->
</mule>
This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.
Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.
| Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Name | Default Value | Description | Java Type | MIME Type | Encoding | Optional. Give a name to this configuration so it can be later referenced. | ||||
| #[variable:crc32] | Optional. The expression where to store the result of the calculated CRC32 produced by this#calculate(Object, MuleEvent) | ||||||||||
INCLUDE_ERROR
INCLUDE_ERROR
Calculates the CRC32 checksum for the given input and stores that value in the targetExpression defined in this#targetExpression To calculate the checksum on the input, it's going to transform it to a byte array by invoking the toByteArray on the object, if one exists, or by serializing it.
INCLUDE_ERROR
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||
| #[payload] | Optional. The object on which to calculate the checksum | Object | */* | ||
| The muleEvent to process | MuleEvent | */* |
| Payload Class | Description |
|---|---|
| IOException | if an error occurs while calculating the checksum |
Filters objects with a different checksum than the expected one. To calculate the checksum on the input, it's going to transform it to a byte array by invoking the toByteArray on the object, if one exists, or by serializing it.
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||
| The expected checksum value for the given input | long | */* | |||
| #[payload] | Optional. Input to be validated | Object | */* | ||
| MP chain | SourceCallback | */* |
| Return Type | Description |
|---|---|
| Object | returns null if the validation fails |
| Payload Class | Description |
|---|---|
| Exception | in case of error calculating the input checksum |