|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infoservice.mailsystem.central.MailContext
public class MailContext
This class stores the configuration for the JAP mailsystem (Singleton).
Field Summary | |
---|---|
static long |
BAN_PERIOD
The period a recipient will be banned after we have received to many requests for his address. |
private static long |
INFOSERVICE_TIMEOUT
The time in ms until the InfoServices loaded from the config file are outdated. |
private int |
m_centralProcessPort
Stores the port where this central mailsystem process is listening for mail requests. |
private javax.mail.Session |
m_mailSession
This stores the Session instance of the Java Mail API. |
static long |
MAIL_ADDRESSES_TIMEOUT
Defines the period mail addresses will be stored in the local database to prevent DoS attacks. |
static int |
MAXIMUM_NUMBER_OF_REQUESTS
Defines how many requests are processed within the MAIL_ADDRESS_TIMEOUT without banning the mailaddress of the recipient. |
private static MailContext |
ms_mcInstance
This stores the instance of MailContext (Singleton). |
Constructor Summary | |
---|---|
private |
MailContext(java.lang.String a_configFile)
Creates a new instance of MailContext. |
Method Summary | |
---|---|
static void |
createInstance(java.lang.String a_configFile)
Creates an instance of MailContext, if there is already one, the old one is overwritten (Singleton). |
int |
getCentralProcessPort()
Retruns the port where this central mailsystem process is listening for mail requests. |
static MailContext |
getInstance()
Returns the instance of MailContext (Singleton). |
javax.mail.Session |
getSession()
Returns the initialized Session instance for the Java Mail API. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long MAIL_ADDRESSES_TIMEOUT
public static final int MAXIMUM_NUMBER_OF_REQUESTS
public static final long BAN_PERIOD
private static final long INFOSERVICE_TIMEOUT
private static MailContext ms_mcInstance
private javax.mail.Session m_mailSession
private int m_centralProcessPort
Constructor Detail |
---|
private MailContext(java.lang.String a_configFile) throws java.lang.Exception
a_configFile
- The path and the filename of the configuration file.
java.lang.Exception
Method Detail |
---|
public static void createInstance(java.lang.String a_configFile) throws java.lang.Exception
a_configFile
- The path and the filename of the configuration file to use for the
new instance.
java.lang.Exception
public static MailContext getInstance()
public javax.mail.Session getSession()
public int getCentralProcessPort()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |