public abstract class MailboxSessionMapperFactory<Id> extends Object implements RequestAware, MailboxMapperFactory<Id>, MessageMapperFactory<Id>, SubscriptionMapperFactory
MailboxSession
. So only one mapper instance is used
in a MailboxSession
Modifier and Type | Field and Description |
---|---|
protected static String |
MAILBOXMAPPER |
protected static String |
MESSAGEMAPPER |
protected static String |
SUBSCRIPTIONMAPPER |
Constructor and Description |
---|
MailboxSessionMapperFactory() |
Modifier and Type | Method and Description |
---|---|
protected abstract MailboxMapper<Id> |
createMailboxMapper(MailboxSession session)
Create a
MailboxMapper instance which will get reused during the whole MailboxSession |
protected abstract MessageMapper<Id> |
createMessageMapper(MailboxSession session)
Create a
MessageMapper instance which will get reused during the whole MailboxSession |
protected abstract SubscriptionMapper |
createSubscriptionMapper(MailboxSession session)
Create a
SubscriptionMapper instance which will get reused during the whole MailboxSession |
void |
endProcessingRequest(MailboxSession session)
Call endRequest on
Mapper instances |
MailboxMapper<Id> |
getMailboxMapper(MailboxSession session)
Create a
MailboxMapper instance or return the one which exists for the MailboxSession already |
MessageMapper<Id> |
getMessageMapper(MailboxSession session)
Create a
MessageMapper instance of return the one which exists for the MailboxSession already |
SubscriptionMapper |
getSubscriptionMapper(MailboxSession session)
Create a
SubscriptionMapper instance or return the one which exists for the MailboxSession already |
void |
startProcessingRequest(MailboxSession session)
Do nothing
|
protected static final String MESSAGEMAPPER
protected static final String MAILBOXMAPPER
protected static final String SUBSCRIPTIONMAPPER
public MessageMapper<Id> getMessageMapper(MailboxSession session) throws MailboxException
MessageMapperFactory
MessageMapper
instance of return the one which exists for the MailboxSession
alreadygetMessageMapper
in interface MessageMapperFactory<Id>
MailboxException
MessageMapperFactory.getMessageMapper(MailboxSession)
protected abstract MessageMapper<Id> createMessageMapper(MailboxSession session) throws MailboxException
MessageMapper
instance which will get reused during the whole MailboxSession
session
- MailboxException
public MailboxMapper<Id> getMailboxMapper(MailboxSession session) throws MailboxException
MailboxMapperFactory
MailboxMapper
instance or return the one which exists for the MailboxSession
alreadygetMailboxMapper
in interface MailboxMapperFactory<Id>
MailboxException
MailboxMapperFactory.getMailboxMapper(MailboxSession)
protected abstract MailboxMapper<Id> createMailboxMapper(MailboxSession session) throws MailboxException
MailboxMapper
instance which will get reused during the whole MailboxSession
session
- MailboxException
public SubscriptionMapper getSubscriptionMapper(MailboxSession session) throws SubscriptionException
SubscriptionMapper
instance or return the one which exists for the MailboxSession
alreadygetSubscriptionMapper
in interface SubscriptionMapperFactory
session
- SubscriptionException
protected abstract SubscriptionMapper createSubscriptionMapper(MailboxSession session) throws SubscriptionException
SubscriptionMapper
instance which will get reused during the whole MailboxSession
session
- SubscriptionException
public void endProcessingRequest(MailboxSession session)
Mapper
instancesendProcessingRequest
in interface RequestAware
session
- public void startProcessingRequest(MailboxSession session)
startProcessingRequest
in interface RequestAware
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.