| java.lang.Object |
| ↳ |
org.mule.modules.security.crc32.CRC32Module |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Class Overview
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.
{@sample.config INCLUDE_ERROR}
{@sample.config INCLUDE_ERROR}
Summary
| Public Methods |
|
void
|
calculate(Object input, MuleEvent muleEvent)
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.
|
|
void
|
checkLicense()
|
|
Object
|
filter(long expectedChecksum, Object input, SourceCallback afterChain)
Filters objects with a different checksum than the expected one.
|
|
String
|
getTargetExpression()
|
|
void
|
setExpressionManager(ExpressionManager expressionManager)
|
|
void
|
setTargetExpression(String targetExpression)
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Fields
private
static
final
Logger
LOGGER
private
ExpressionManager
expressionManager
private
String
targetExpression
The expression where to store the result of the calculated CRC32
produced by this#calculate(Object, MuleEvent)
private
boolean
targetExpressionValidated
Public Constructors
Public Methods
public
void
calculate
(Object input, MuleEvent muleEvent)
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.
Parameters
| input
| The object on which to calculate the checksum |
| muleEvent
| The muleEvent to process |
Throws
| IOException
| if an error occurs while calculating the checksum
|
public
void
checkLicense
()
public
Object
filter
(long expectedChecksum, Object input, SourceCallback afterChain)
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.
Parameters
| expectedChecksum
| The expected checksum value for the given input |
| input
| Input to be validated |
| afterChain
| MP chain |
Returns
- returns null if the validation fails
Throws
| Exception
| in case of error calculating the input checksum
|
public
String
getTargetExpression
()
public
void
setExpressionManager
(ExpressionManager expressionManager)
public
void
setTargetExpression
(String targetExpression)