Class SimpleMessageGroupFactory
java.lang.Object
org.springframework.integration.store.SimpleMessageGroupFactory
- All Implemented Interfaces:
MessageGroupFactory
public class SimpleMessageGroupFactory extends Object implements MessageGroupFactory
The
MessageGroupFactory
implementation to produce SimpleMessageGroup
instances.
The SimpleMessageGroupFactory.GroupType
modificator specifies the internal collection for the SimpleMessageGroup
.
The SimpleMessageGroupFactory.GroupType.HASH_SET
is the default type.- Since:
- 4.3
- Author:
- Artem Bilan
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleMessageGroupFactory.GroupType
-
Constructor Summary
Constructors Constructor Description SimpleMessageGroupFactory()
SimpleMessageGroupFactory(SimpleMessageGroupFactory.GroupType type)
-
Method Summary
Modifier and Type Method Description MessageGroup
create(Object groupId)
Create aMessageGroup
instance based on the providedgroupId
.MessageGroup
create(Collection<? extends Message<?>> messages, Object groupId)
MessageGroup
create(Collection<? extends Message<?>> messages, Object groupId, long timestamp, boolean complete)
MessageGroup
create(MessageGroupStore messageGroupStore, Object groupId)
Create aMessageGroup
instance based on the providedgroupId
.MessageGroup
create(MessageGroupStore messageGroupStore, Object groupId, long timestamp, boolean complete)
Create aMessageGroup
instance based on the providedgroupId
.
-
Constructor Details
-
SimpleMessageGroupFactory
public SimpleMessageGroupFactory() -
SimpleMessageGroupFactory
-
-
Method Details
-
create
Description copied from interface:MessageGroupFactory
Create aMessageGroup
instance based on the providedgroupId
.- Specified by:
create
in interfaceMessageGroupFactory
- Parameters:
groupId
- the group id to use.- Returns:
- the
MessageGroup
instance.
-
create
Description copied from interface:MessageGroupFactory
- Specified by:
create
in interfaceMessageGroupFactory
- Parameters:
messages
- the messages for the group.groupId
- the group id to use.- Returns:
- the
MessageGroup
instance.
-
create
public MessageGroup create(Collection<? extends Message<?>> messages, Object groupId, long timestamp, boolean complete)Description copied from interface:MessageGroupFactory
Create aMessageGroup
instance based on the providedgroupId
and with themessages
for the group. In addition the creatingtimestamp
andcomplete
flag may be used to customize the targetMessageGroup
object.- Specified by:
create
in interfaceMessageGroupFactory
- Parameters:
messages
- the messages for the group.groupId
- the group id to use.timestamp
- the creation time.complete
- theboolean
flag to indicate that group is completed.- Returns:
- the
MessageGroup
instance.
-
create
Description copied from interface:MessageGroupFactory
Create aMessageGroup
instance based on the providedgroupId
. TheMessageGroupStore
may be consulted for the messages and metadata for theMessageGroup
.- Specified by:
create
in interfaceMessageGroupFactory
- Parameters:
messageGroupStore
- theMessageGroupStore
for additionalMessageGroup
information.groupId
- the group id to use.- Returns:
- the
MessageGroup
instance.
-
create
public MessageGroup create(MessageGroupStore messageGroupStore, Object groupId, long timestamp, boolean complete)Description copied from interface:MessageGroupFactory
Create aMessageGroup
instance based on the providedgroupId
. TheMessageGroupStore
may be consulted for the messages and metadata for theMessageGroup
. In addition the creatingtimestamp
andcomplete
flag may be used to customize the targetMessageGroup
object.- Specified by:
create
in interfaceMessageGroupFactory
- Parameters:
messageGroupStore
- theMessageGroupStore
for additionalMessageGroup
information.groupId
- the group id to use.timestamp
- the creation time.complete
- theboolean
flag to indicate that group is completed.- Returns:
- the
MessageGroup
instance.
-