public class FileSessionProvider extends SessionProvider
SessionProvider
using the local file system and file lock.Modifier and Type | Field and Description |
---|---|
static String |
KEY_DIRECTORY
Profile key name of session storage directory.
|
Constructor and Description |
---|
FileSessionProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure(SessionProfile profile)
Configures this provider.
|
SessionMirror |
create(String id)
Creates a new session and acquires the session with the specified session ID.
|
void |
delete(String id)
Deletes a session with the specified session ID.
|
List<String> |
getCreatedIds()
Returns session IDs which are created and not completed/aborted.
|
SessionMirror |
open(String id)
Opens and acquires a created session with the specified session ID.
|
public static final String KEY_DIRECTORY
${VARIABLE-NAME}
.protected void configure(SessionProfile profile) throws IOException
BaseProvider
configure
in class BaseProvider<SessionProfile>
profile
- the profileIOException
- if failed to configure thispublic List<String> getCreatedIds() throws IOException
SessionProvider
getCreatedIds
in class SessionProvider
IOException
- if failed to list IDspublic SessionMirror create(String id) throws SessionException, IOException
SessionProvider
create
in class SessionProvider
id
- target session IDSessionException
- if session was invalid stateIOException
- if failed to create a new sessionpublic SessionMirror open(String id) throws SessionException, IOException
SessionProvider
open
in class SessionProvider
id
- target session IDSessionException
- if session was invalid stateIOException
- if failed to open the sessionpublic void delete(String id) throws IOException
SessionProvider
delete
in class SessionProvider
id
- target session IDSessionException
- if session was invalid state, except the session was brokenIOException
- if failed to delete the sessionCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.