|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.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. |
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 loadedpublic 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 loadedpublic TransientRepository(RepositoryConfig config) throws IOException
config
- repository configuration
IOException
- if the static repository descriptors cannot be loadedpublic 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 loadedMethod Detail |
public String[] getDescriptorKeys()
getDescriptorKeys
in interface Repository
Repository.getDescriptorKeys()
public String getDescriptor(String key)
getDescriptor
in interface Repository
key
- descriptor key
Repository.getDescriptor(String)
public Session login(Credentials credentials, String workspaceName) throws RepositoryException
login
in interface Repository
credentials
- 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 Repository
credentials
- 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 Repository
workspaceName
- 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 Repository
RepositoryException
- if the session could not be createdRepository.login(Credentials)
public void loggedOut(SessionImpl session)
loggedOut
in interface SessionListener
session
- 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 |