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