Package org.apache.ofbiz.service.mail
Class JavaMailContainer
- java.lang.Object
-
- org.apache.ofbiz.service.mail.JavaMailContainer
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
configFile
protected Delegator
delegator
protected boolean
deleteMail
protected LocalDispatcher
dispatcher
static java.lang.String
INBOX
protected long
maxSize
static java.lang.String
module
protected java.util.concurrent.ScheduledExecutorService
pollTimer
protected java.util.Map<Store,Session>
stores
protected long
timerDelay
protected GenericValue
userLogin
-
Constructor Summary
Constructors Constructor Description JavaMailContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Return the container name.protected Store
getStore(Session session)
void
init(java.util.List<StartupCommand> ofbizCommands, java.lang.String name, java.lang.String configFile)
Initialize the container.protected Session
makeSession(ContainerConfig.Configuration.Property client)
boolean
start()
Start the container process.void
stop()
Stop the container process.protected URLName
updateUrlName(URLName urlName, java.util.Properties props)
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
INBOX
public static final java.lang.String INBOX
- See Also:
- Constant Field Values
-
delegator
protected Delegator delegator
-
dispatcher
protected LocalDispatcher dispatcher
-
userLogin
protected GenericValue userLogin
-
timerDelay
protected long timerDelay
-
maxSize
protected long maxSize
-
pollTimer
protected java.util.concurrent.ScheduledExecutorService pollTimer
-
deleteMail
protected boolean deleteMail
-
configFile
protected java.lang.String configFile
-
-
Method Detail
-
init
public void init(java.util.List<StartupCommand> ofbizCommands, java.lang.String name, java.lang.String configFile) throws ContainerException
Description copied from interface:Container
Initialize the container. This method must not block - implementations should initialize internal structures and then return.- Specified by:
init
in interfaceContainer
- Parameters:
ofbizCommands
- Command-line arguments.name
- Unique name of the container's instance.configFile
- Location of the configuration file used to load this container.- Throws:
ContainerException
- If an error was encountered. Throwing this exception will halt container loading, so it should be thrown only when other containers might depend on this one.
-
start
public boolean start() throws ContainerException
Description copied from interface:Container
Start the container process. This method must not block - implementations that require thread blocking must create a separate thread and then return.- Specified by:
start
in interfaceContainer
- Returns:
true
if the process started.- Throws:
ContainerException
- If an error was encountered.
-
stop
public void stop() throws ContainerException
Description copied from interface:Container
Stop the container process. This method must not block.- Specified by:
stop
in interfaceContainer
- Throws:
ContainerException
- If an error was encountered.
-
getName
public java.lang.String getName()
Description copied from interface:Container
Return the container name.
-
makeSession
protected Session makeSession(ContainerConfig.Configuration.Property client)
-
getStore
protected Store getStore(Session session) throws ContainerException
- Throws:
ContainerException
-
-