|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.TransientRepository
public class TransientRepository
A repository proxy that automatically initializes and shuts down the underlying repository instance when the first session is opened or the last one closed. As long as all sessions are properly closed when no longer used, this class can be used to avoid having to explicitly shut down the repository.
| Nested Class Summary | |
|---|---|
static interface |
TransientRepository.RepositoryFactory
Factory interface for creating RepositoryImpl instances. |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
TransientRepository()
Creates a transient repository proxy that will use the repository configuration file and home directory specified in system properties org.apache.jackrabbit.repository.conf and
org.apache.jackrabbit.repository.home. |
|
TransientRepository(RepositoryConfig config)
Creates a transient repository proxy that will use the given repository configuration to initialize the underlying repository instance. |
|
TransientRepository(String config,
String home)
Creates a transient repository proxy that will use the given repository configuration file and home directory paths to initialize the underlying repository instances. |
|
TransientRepository(TransientRepository.RepositoryFactory factory)
Creates a transient repository proxy that will use the given repository factory to initialize the underlying repository instances. |
|
| Method Summary | |
|---|---|
String |
getDescriptor(String key)
Returns the identified repository descriptor. |
String[] |
getDescriptorKeys()
Returns the available descriptor keys. |
void |
loggedOut(SessionImpl session)
Removes the given session from the set of open sessions. |
void |
loggingOut(SessionImpl session)
Ignored. |
Session |
login()
Calls login(Credentials, String) with null login
credentials and a null workspace name. |
Session |
login(Credentials credentials)
Calls login(Credentials, String) with a null
workspace name. |
Session |
login(Credentials credentials,
String workspaceName)
Logs in to the content repository. |
Session |
login(String workspaceName)
Calls login(Credentials, String) with null login
credentials. |
void |
shutdown()
Forces all active sessions to logout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransientRepository(TransientRepository.RepositoryFactory factory)
throws IOException
factory - repository factory
IOException - if the static repository descriptors cannot be loaded
public TransientRepository()
throws IOException
org.apache.jackrabbit.repository.conf and
org.apache.jackrabbit.repository.home. If these properties
are not found, then the default values "repository.xml"
and "repository" are used.
IOException - if the static repository descriptors cannot be loaded
public TransientRepository(RepositoryConfig config)
throws IOException
config - repository configuration
IOException - if the static repository descriptors cannot be loaded
public TransientRepository(String config,
String home)
throws IOException
If the given repository configuration file does not exist, then a default configuration file is copied to the given location when the first session starts. Similarly, if the given repository home directory does not exist, it is automatically created when the first session starts. This is a convenience feature designed to reduce the need for manual configuration.
config - repository configuration filehome - repository home directory
IOException - if the static repository descriptors cannot be loaded| Method Detail |
|---|
public String[] getDescriptorKeys()
getDescriptorKeys in interface RepositoryRepository.getDescriptorKeys()public String getDescriptor(String key)
getDescriptor in interface Repositorykey - descriptor key
Repository.getDescriptor(String)
public Session login(Credentials credentials,
String workspaceName)
throws RepositoryException
login in interface Repositorycredentials - login credentialsworkspaceName - workspace name
RepositoryException - if the session could not be createdRepository.login(Credentials,String)
public Session login(Credentials credentials)
throws RepositoryException
login(Credentials, String) with a null
workspace name.
login in interface Repositorycredentials - login credentials
RepositoryException - if the session could not be createdRepository.login(Credentials)
public Session login(String workspaceName)
throws RepositoryException
login(Credentials, String) with null login
credentials.
login in interface RepositoryworkspaceName - workspace name
RepositoryException - if the session could not be createdRepository.login(String)
public Session login()
throws RepositoryException
login(Credentials, String) with null login
credentials and a null workspace name.
login in interface RepositoryRepositoryException - if the session could not be createdRepository.login(Credentials)public void shutdown()
shutdown in interface JackrabbitRepositorySession.logout()public void loggedOut(SessionImpl session)
loggedOut in interface SessionListenersession - closed sessionSessionListener.loggedOut(SessionImpl)public void loggingOut(SessionImpl session)
Session is about to be 'closed' by
calling Session.logout()
- Specified by:
loggingOut in interface SessionListener
- Parameters:
session - the Session that is about to be 'closed'
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||