Class SplitPayloadTransform
java.lang.Object
com.onenetwork.platform.integ.msg.MessageTransform
com.onenetwork.platform.integ.msg.SplitPayloadTransform
public class SplitPayloadTransform extends MessageTransform
SplitPayloadTransform splits a large payload and enqueue the smaller chunks.
To use this, you need to first setup this transformer for your interface which should be higher in precedence
than any other existing transform entries to always execute first.
Setup an external reference entry as mentioned below -
RefType - "SplitPayload"
ExternalValue - ~~~~ or ~
LocalValue -
For ex: if the SplitPayload external reference entry is setup with a local value of 10000, then
the payload will be split into chunks of 10000 rows and if the file has lesser than 10000 rows, it will simply enqeue the payload as-is.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REFTYPE_FOR_SPLIT_PAYLOAD
-
Constructor Summary
Constructors Constructor Description SplitPayloadTransform()
-
Method Summary
Modifier and Type Method Description void
transform(java.io.InputStream in, java.io.OutputStream out, MessageTransformContext transformContext)
Implementor should read the payload from the InputStream and write it to the OutputStream.
-
Field Details
-
REFTYPE_FOR_SPLIT_PAYLOAD
public static final java.lang.String REFTYPE_FOR_SPLIT_PAYLOAD- See Also:
- Constant Field Values
-
-
Constructor Details
-
SplitPayloadTransform
public SplitPayloadTransform()
-
-
Method Details
-
transform
public void transform(java.io.InputStream in, java.io.OutputStream out, MessageTransformContext transformContext) throws java.lang.ExceptionDescription copied from class:MessageTransform
Implementor should read the payload from the InputStream and write it to the OutputStream. It is not necessary to close the streams (the caller will close them explicitly).- Specified by:
transform
in classMessageTransform
- Parameters:
in
- InputStream of the orginal payloadout
- OutputStream of the transformed payloadtransformContext
- Context contains user information who is performing this transformation- Throws:
java.lang.Exception
- any exception to retry the transform, orMessageTransformFailedException
to fail without retry- See Also:
MessageTransform.transform(java.io.InputStream, java.io.OutputStream, com.onenetwork.platform.integ.msg.MessageTransformContext)
-