Class MessageSplitterImp
- java.lang.Object
-
- com.adaptris.core.services.splitter.MessageSplitterImp
-
- All Implemented Interfaces:
MessageSplitter
- Direct Known Subclasses:
LineCountSplitter
,MessageCopier
,MimePartSplitter
,MultiPayloadMessageSplitter
,SizeBasedSplitter
,StringPayloadSplitter
,XpathMessageSplitter
public abstract class MessageSplitterImp extends java.lang.Object implements MessageSplitter
Partial implementation of MessageSplitter that handlesMessageSplitter.splitMessage(AdaptrisMessage)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
MessageSplitterImp.SplitMessageIterator
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logR
-
Constructor Summary
Constructors Constructor Description MessageSplitterImp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyMetadata(AdaptrisMessage parent, AdaptrisMessage child)
Copy metadata from the parent to the child.java.lang.Boolean
getCopyMetadata()
Returns whether to copy metadata from the original message to the split messages.java.lang.Boolean
getCopyObjectMetadata()
AdaptrisMessageFactory
getMessageFactory()
protected AdaptrisMessageFactory
selectFactory(AdaptrisMessage msg)
Select the AdaptrisMessageFactory instance to use to create new messages.void
setCopyMetadata(java.lang.Boolean b)
Sets whether to copy metadata from the original message to the split messages.void
setCopyObjectMetadata(java.lang.Boolean b)
Whether or not to preserve object metadata to the split messages.void
setMessageFactory(AdaptrisMessageFactory f)
Set the message factory used when creating AdaptrisMessage instances.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.services.splitter.MessageSplitter
splitMessage
-
-
-
-
Method Detail
-
copyMetadata
protected void copyMetadata(AdaptrisMessage parent, AdaptrisMessage child)
Copy metadata from the parent to the child.- Parameters:
parent
- the parent AdaptrisMessagechild
- the child AdaptrisMessage- See Also:
setCopyMetadata(Boolean)
,setCopyObjectMetadata(Boolean)
-
selectFactory
protected AdaptrisMessageFactory selectFactory(AdaptrisMessage msg)
Select the AdaptrisMessageFactory instance to use to create new messages.- Parameters:
msg
- the AdaptrisMessage to derive the message factory from.- Returns:
- an AdaptrisMessageFactory instance
- See Also:
AdaptrisMessage.getFactory()
,setMessageFactory(AdaptrisMessageFactory)
-
getMessageFactory
public AdaptrisMessageFactory getMessageFactory()
- Returns:
- the messageFactory, null if not specified.
-
setMessageFactory
public void setMessageFactory(AdaptrisMessageFactory f)
Set the message factory used when creating AdaptrisMessage instances.- Parameters:
f
- the messageFactory to set
-
setCopyMetadata
public void setCopyMetadata(java.lang.Boolean b)
Sets whether to copy metadata from the original message to the split messages.
- Parameters:
b
- whether to copy metadata from the original message to the split messages (default true)
-
getCopyMetadata
public java.lang.Boolean getCopyMetadata()
Returns whether to copy metadata from the original message to the split messages.
- Returns:
- whether to copy metadata from the original message to the split messages
-
getCopyObjectMetadata
public java.lang.Boolean getCopyObjectMetadata()
-
setCopyObjectMetadata
public void setCopyObjectMetadata(java.lang.Boolean b)
Whether or not to preserve object metadata to the split messages.- Parameters:
b
- true to preserve object metadata (default false)
-
-