public class EventRegistryInboundMessageAccountService extends Object implements InboundMessageAccountService
Modifier and Type | Field and Description |
---|---|
protected DefaultTenantProvider |
defaultTenantProvider |
static String |
EVENT_KEY_INACTIVE_ACCOUNT |
static String |
EVENT_KEY_NO_ACCOUNT |
static String |
EVENT_KEY_NO_ACCOUNT_AND_TENANT |
protected EventRegistry |
eventRegistry |
protected InboundMessageEventPayloadExtractor |
inboundMessageEventPayloadExtractor |
protected InboundMessageTenantExtractor |
tenantExtractorService |
Constructor and Description |
---|
EventRegistryInboundMessageAccountService(EventRegistry eventRegistry,
InboundMessageTenantExtractor tenantExtractorService,
DefaultTenantProvider defaultTenantProvider,
InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor) |
Modifier and Type | Method and Description |
---|---|
protected Collection<EventPayloadInstance> |
extractEventPayload(InboundMessage message)
Internal hook method extracting the data of the inbound message and adding them as payload to the event instance.
|
protected Collection<EventPayloadInstance> |
extractEventPayload(InboundMessage message,
UserAccount userAccount)
Internal hook method extracting the data of the inbound message as well as the user account and adding them as payload to the event instance.
|
protected String |
extractTenantId(InboundMessage inboundMessage)
Internal hook method extracting the tenant id out of the given inbound message.
|
void |
messageReceivedInactiveAccount(InboundMessage inboundMessage,
UserAccount userAccount)
A new inbound message has been received and the user account is no active
|
void |
messageReceivedNoAccount(InboundMessage inboundMessage)
A new inbound message has been received and it is not linked with an account
|
public static final String EVENT_KEY_NO_ACCOUNT_AND_TENANT
public static final String EVENT_KEY_NO_ACCOUNT
public static final String EVENT_KEY_INACTIVE_ACCOUNT
protected final EventRegistry eventRegistry
protected final InboundMessageTenantExtractor tenantExtractorService
protected final DefaultTenantProvider defaultTenantProvider
protected final InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor
public EventRegistryInboundMessageAccountService(EventRegistry eventRegistry, InboundMessageTenantExtractor tenantExtractorService, DefaultTenantProvider defaultTenantProvider, InboundMessageEventPayloadExtractor inboundMessageEventPayloadExtractor)
public void messageReceivedNoAccount(InboundMessage inboundMessage)
InboundMessageAccountService
messageReceivedNoAccount
in interface InboundMessageAccountService
inboundMessage
- the received inbound messagepublic void messageReceivedInactiveAccount(InboundMessage inboundMessage, UserAccount userAccount)
InboundMessageAccountService
messageReceivedInactiveAccount
in interface InboundMessageAccountService
inboundMessage
- the received inbound messageuserAccount
- the account of the user that send the message (never null
)protected String extractTenantId(InboundMessage inboundMessage)
InboundMessageTenantExtractor.extractTenantId(InboundMessage)
method.inboundMessage
- the inbound message to extract the tenant id from (most likely encoded within the message content or a default one)protected Collection<EventPayloadInstance> extractEventPayload(InboundMessage message)
message
- the inbound message to turn into event payloadprotected Collection<EventPayloadInstance> extractEventPayload(InboundMessage message, UserAccount userAccount)
message
- the inbound message to turn into event payloaduserAccount
- the user account to turn into the event payload