public class SessionUtil
extends java.lang.Object
Constructor and Description |
---|
SessionUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
getBooleanProperty(Session session,
java.lang.String name,
boolean defaultValue)
Get a property associated with this mail session as a boolean value.
|
static boolean |
getBooleanProperty(java.lang.String name,
boolean defaultValue)
Get a system property associated with this mail session as a boolean value.
|
static int |
getIntProperty(Session session,
java.lang.String name,
int defaultValue)
Get a property associated with this mail session as an integer value.
|
static java.lang.String |
getProperty(Session session,
java.lang.String name)
Get a property associated with this mail session.
|
static java.lang.String |
getProperty(Session session,
java.lang.String name,
java.lang.String defaultValue)
Get a property associated with this mail session.
|
static java.lang.String |
getProperty(java.lang.String name)
Get a system property associated with this mail session as a boolean value.
|
static java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
Get a system property associated with this mail session as a boolean value.
|
static boolean |
isPropertyFalse(Session session,
java.lang.String name)
Process a session property as a boolean value, returning
either true or false.
|
static boolean |
isPropertyTrue(Session session,
java.lang.String name)
Process a session property as a boolean value, returning
either true or false.
|
public static java.lang.String getProperty(Session session, java.lang.String name)
session
- The attached session.name
- The name of the property.public static java.lang.String getProperty(Session session, java.lang.String name, java.lang.String defaultValue)
session
- The attached session.name
- The name of the property.defaultValue
- The default value to return if the property doesn't exist.public static boolean isPropertyTrue(Session session, java.lang.String name)
session
- The source session.name
- public static boolean isPropertyFalse(Session session, java.lang.String name)
session
- The source session.name
- public static int getIntProperty(Session session, java.lang.String name, int defaultValue)
session
- The source session.name
- The name of the property.defaultValue
- The default value to return if the property doesn't exist.public static boolean getBooleanProperty(Session session, java.lang.String name, boolean defaultValue)
session
- The source session.name
- The name of the property.defaultValue
- The default value to return if the property doesn't exist.public static boolean getBooleanProperty(java.lang.String name, boolean defaultValue)
name
- The name of the property.defaultValue
- The default value to return if the property doesn't exist.public static java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
name
- The name of the property.defaultValue
- The default value to return if the property doesn't exist.public static java.lang.String getProperty(java.lang.String name)
name
- The name of the property.