Class StringPayloadSplitter
- java.lang.Object
-
- com.adaptris.core.services.splitter.MessageSplitterImp
-
- com.adaptris.core.services.splitter.StringPayloadSplitter
-
- All Implemented Interfaces:
MessageSplitter
- Direct Known Subclasses:
SimpleRegexpMessageSplitter
public abstract class StringPayloadSplitter extends MessageSplitterImp
Partial implementation of MessageSplitter that splits Strings based payloads.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.services.splitter.MessageSplitterImp
MessageSplitterImp.SplitMessageIterator
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.services.splitter.MessageSplitterImp
logR
-
-
Constructor Summary
Constructors Constructor Description StringPayloadSplitter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.List<java.lang.String>
split(java.lang.String messagePayload)
default split operation.java.util.List<AdaptrisMessage>
splitMessage(AdaptrisMessage msg)
Splits anAdaptrisMessage
into some number of AdaptrisMessage objects.-
Methods inherited from class com.adaptris.core.services.splitter.MessageSplitterImp
copyMetadata, getCopyMetadata, getCopyObjectMetadata, getMessageFactory, selectFactory, setCopyMetadata, setCopyObjectMetadata, setMessageFactory
-
-
-
-
Method Detail
-
splitMessage
public java.util.List<AdaptrisMessage> splitMessage(AdaptrisMessage msg) throws CoreException
Description copied from interface:MessageSplitter
Splits an
AdaptrisMessage
into some number of AdaptrisMessage objects. Preservation of metadata is down to the implementation.If this method returns a
CloseableIterable
, it must be closed by the caller! This contract cannot be clearly expressed in Java code without breaking the API in uncomfortable ways for things just returning a List, which is why this method is only declared to return Iterable.- Parameters:
msg
- the msg to split- Returns:
- an
Iterable
ofAdaptrisMessage
- Throws:
CoreException
- wrapping any other exception- See Also:
MessageSplitter.splitMessage(AdaptrisMessage)
-
split
protected abstract java.util.List<java.lang.String> split(java.lang.String messagePayload) throws java.lang.Exception
default split operation.- Parameters:
messagePayload
- the string payload derived from theAdaptrisMessage
- Returns:
- a list of strings that make up the split messages.
- Throws:
java.lang.Exception
-
-