public class SimpleMessageGroupFactory extends Object implements MessageGroupFactory
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.Modifier and Type | Class and Description |
---|---|
static class |
SimpleMessageGroupFactory.GroupType |
Constructor and Description |
---|
SimpleMessageGroupFactory() |
SimpleMessageGroupFactory(SimpleMessageGroupFactory.GroupType type) |
Modifier and Type | Method and Description |
---|---|
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 a
MessageGroup instance based on the provided groupId . |
MessageGroup |
create(MessageGroupStore messageGroupStore,
Object groupId,
long timestamp,
boolean complete)
Create a
MessageGroup instance based on the provided groupId . |
MessageGroup |
create(Object groupId)
Create a
MessageGroup instance based on the provided groupId . |
public SimpleMessageGroupFactory()
public SimpleMessageGroupFactory(SimpleMessageGroupFactory.GroupType type)
public MessageGroup create(Object groupId)
MessageGroupFactory
MessageGroup
instance based on the provided groupId
.create
in interface MessageGroupFactory
groupId
- the group id to use.MessageGroup
instance.public MessageGroup create(Collection<? extends Message<?>> messages, Object groupId)
MessageGroupFactory
create
in interface MessageGroupFactory
messages
- the messages for the group.groupId
- the group id to use.MessageGroup
instance.public MessageGroup create(Collection<? extends Message<?>> messages, Object groupId, long timestamp, boolean complete)
MessageGroupFactory
MessageGroup
instance based on the provided groupId
and with the messages
for the group.
In addition the creating timestamp
and complete
flag may be used to customize
the target MessageGroup
object.create
in interface MessageGroupFactory
messages
- the messages for the group.groupId
- the group id to use.timestamp
- the creation time.complete
- the boolean
flag to indicate that group is completed.MessageGroup
instance.public MessageGroup create(MessageGroupStore messageGroupStore, Object groupId)
MessageGroupFactory
MessageGroup
instance based on the provided groupId
.
The MessageGroupStore
may be consulted for the messages and metadata for the MessageGroup
.create
in interface MessageGroupFactory
messageGroupStore
- the MessageGroupStore
for additional MessageGroup
information.groupId
- the group id to use.MessageGroup
instance.public MessageGroup create(MessageGroupStore messageGroupStore, Object groupId, long timestamp, boolean complete)
MessageGroupFactory
MessageGroup
instance based on the provided groupId
.
The MessageGroupStore
may be consulted for the messages and metadata for the MessageGroup
.
In addition the creating timestamp
and complete
flag may be used to customize
the target MessageGroup
object.create
in interface MessageGroupFactory
messageGroupStore
- the MessageGroupStore
for additional MessageGroup
information.groupId
- the group id to use.timestamp
- the creation time.complete
- the boolean
flag to indicate that group is completed.MessageGroup
instance.