public class SessionProfile extends BaseProfile<SessionProfile,SessionProvider>
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_PREFIX
Prefix of property keys about session.
|
static String |
KEY_PROVIDER
Key name of session provider.
|
QUALIFIER| Constructor and Description |
|---|
SessionProfile(Class<? extends SessionProvider> providerClass,
ProfileContext context,
Map<String,String> configuration)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getConfiguration()
Returns the extra configuration of the session.
|
ProfileContext |
getContext()
Returns the current profile context.
|
Class<? extends SessionProvider> |
getProviderClass()
Returns the class of corresponded provider.
|
protected SessionProfile |
getThis()
Returns this object.
|
static SessionProfile |
loadFrom(Properties properties,
ClassLoader loader)
Deprecated.
use
loadFrom(Properties, ProfileContext) instead |
static SessionProfile |
loadFrom(Properties properties,
ProfileContext context)
Loads a session profile from the properties.
|
static void |
removeCorrespondingKeys(Properties properties)
Removes entries corresponding to resource profiles.
|
void |
storeTo(Properties properties)
Stores this profile into the specified properties.
|
createProvider, getClassLoader, loadProviderClasspublic static final String KEY_PROVIDER
public static final String KEY_PREFIX
public SessionProfile(Class<? extends SessionProvider> providerClass, ProfileContext context, Map<String,String> configuration)
providerClass - the class which can provide the sessioncontext - the current profile contextconfiguration - the extra configurationIllegalArgumentException - if any parameter is nullpublic Class<? extends SessionProvider> getProviderClass()
BaseProfilegetProviderClass in class BaseProfile<SessionProfile,SessionProvider>public ProfileContext getContext()
BaseProfilegetContext in class BaseProfile<SessionProfile,SessionProvider>public Map<String,String> getConfiguration()
protected SessionProfile getThis()
BaseProfilegetThis in class BaseProfile<SessionProfile,SessionProvider>@Deprecated public static SessionProfile loadFrom(Properties properties, ClassLoader loader)
loadFrom(Properties, ProfileContext) insteadproperties - source propertiesloader - class loader to load the SessionProviderIllegalArgumentException - if properties are invalid, or if any parameter is nullpublic static SessionProfile loadFrom(Properties properties, ProfileContext context)
properties - source propertiescontext - the current profile contextIllegalArgumentException - if properties are invalid, or if any parameter is nullpublic void storeTo(Properties properties)
properties - target properties objectIllegalArgumentException - if target properties already contains keys about this session,
or if any parameter is nullpublic static void removeCorrespondingKeys(Properties properties)
properties - target propertiesIllegalArgumentException - if any parameter is nullCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.