public final class BatchAPI
extends java.lang.Object
The relevant methods are all public static
so that they can be used from ALSB Java Callouts. The class is not designed to be instantiated, and cannot be as it has a private constructor.
Modifier and Type | Method and Description |
---|---|
static StringMessageAggregator |
addStringMessage(java.lang.String message, StringMessageAggregator aggregator)
Adds a string message to a string message batch.
|
static StringMessageAggregator |
createStringMessageAggregator(java.lang.String separator, boolean appendAtTheEnd)
Creates a message aggregator for String messages.
|
static java.lang.String |
getAggregatedStringMessageBatch(StringMessageAggregator aggregator)
Constructs the batch from a collection of messages stored in an aggregator.
|
static XmlTextMessageWrappersDocument |
parseStringBatch(java.lang.String messageBatch, java.lang.String separator)
Parses and splits a string batch into multiple messages.
|
public static StringMessageAggregator addStringMessage(java.lang.String message, StringMessageAggregator aggregator)
message
- the message to be added.aggregator
- the aggregator to add to.BatchService.addStringMessage(java.lang.String, com.bea.alsb.financial.api.StringMessageAggregator)
public static StringMessageAggregator createStringMessageAggregator(java.lang.String separator, boolean appendAtTheEnd)
separator
- the separator to insert between messages.appendAtTheEnd
- true
to append a separator after a new message, false
otherwise.BatchService.createStringMessageAggregator(java.lang.String, boolean)
public static java.lang.String getAggregatedStringMessageBatch(StringMessageAggregator aggregator) throws AggregationException
aggregator
- the aggregator containing the messages and that is supposed to construct the batch. The batch will look like this:
<message1><separator><message2><separator>...<separator> <messageN>[<separator>]
, where the last <separator>
is present if and only if the appendAtTheEnd
flag was set upon creating the aggregator.AggregationException
- for aggregation problems.BatchService.getAggregatedStringMessageBatch( com.bea.alsb.financial.api.StringMessageAggregator)
public static XmlTextMessageWrappersDocument parseStringBatch(java.lang.String messageBatch, java.lang.String separator)
messageBatch
-separator
-BatchService.parseStringBatch(java.lang.String, java.lang.String)