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, loadProviderClass
public 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 null
public Class<? extends SessionProvider> getProviderClass()
BaseProfile
getProviderClass
in class BaseProfile<SessionProfile,SessionProvider>
public ProfileContext getContext()
BaseProfile
getContext
in class BaseProfile<SessionProfile,SessionProvider>
public Map<String,String> getConfiguration()
protected SessionProfile getThis()
BaseProfile
getThis
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 SessionProvider
IllegalArgumentException
- if properties are invalid, or if any parameter is null
public static SessionProfile loadFrom(Properties properties, ProfileContext context)
properties
- source propertiescontext
- the current profile contextIllegalArgumentException
- if properties are invalid, or if any parameter is null
public void storeTo(Properties properties)
properties
- target properties objectIllegalArgumentException
- if target properties already contains keys about this session,
or if any parameter is null
public static void removeCorrespondingKeys(Properties properties)
properties
- target propertiesIllegalArgumentException
- if any parameter is null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.