Interface MessageGroupFactory
- All Known Implementing Classes:
SimpleMessageGroupFactory
public interface MessageGroupFactory
The
MessageGroup
factory strategy.
This strategy is used from the MessageGroup
-aware components, e.g. MessageGroupStore
.- Since:
- 4.3
- Author:
- Artem Bilan
-
Method Summary
Modifier and TypeMethodDescriptionCreate aMessageGroup
instance based on the providedgroupId
.create
(Collection<? extends Message<?>> messages, Object groupId) create
(Collection<? extends Message<?>> messages, Object groupId, long timestamp, boolean complete) create
(MessageGroupStore messageGroupStore, Object groupId) Create aMessageGroup
instance based on the providedgroupId
.create
(MessageGroupStore messageGroupStore, Object groupId, long timestamp, boolean complete) Create aMessageGroup
instance based on the providedgroupId
.
-
Method Details
-
create
Create aMessageGroup
instance based on the providedgroupId
.- Parameters:
groupId
- the group id to use.- Returns:
- the
MessageGroup
instance.
-
create
- Parameters:
messages
- the messages for the group.groupId
- the group id to use.- Returns:
- the
MessageGroup
instance.
-
create
MessageGroup create(Collection<? extends Message<?>> messages, Object groupId, long timestamp, boolean complete) 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.- 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
Create aMessageGroup
instance based on the providedgroupId
. TheMessageGroupStore
may be consulted for the messages and metadata for theMessageGroup
.- Parameters:
messageGroupStore
- theMessageGroupStore
for additionalMessageGroup
information.groupId
- the group id to use.- Returns:
- the
MessageGroup
instance.
-
create
MessageGroup create(MessageGroupStore messageGroupStore, Object groupId, long timestamp, boolean complete) 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.- 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.
-