org.apache.jackrabbit.server
Class SessionProviderImpl

java.lang.Object
  extended by org.apache.jackrabbit.server.SessionProviderImpl
All Implemented Interfaces:
SessionProvider

public class SessionProviderImpl
extends Object
implements SessionProvider

This Class implements a default session provider uses a credentials provider.


Constructor Summary
SessionProviderImpl(CredentialsProvider cp)
          Creates a new SessionProvider
 
Method Summary
 Session getSession(javax.servlet.http.HttpServletRequest request, Repository repository, String workspace)
          Provides the repository session suitable for the given request.
 void releaseSession(Session session)
          Informs this provider that the session aquired by a previous SessionProvider.getSession(javax.servlet.http.HttpServletRequest, javax.jcr.Repository, java.lang.String) call is no longer needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionProviderImpl

public SessionProviderImpl(CredentialsProvider cp)
Creates a new SessionProvider

Parameters:
cp -
Method Detail

getSession

public Session getSession(javax.servlet.http.HttpServletRequest request,
                          Repository repository,
                          String workspace)
                   throws LoginException,
                          RepositoryException,
                          javax.servlet.ServletException
Provides the repository session suitable for the given request.

Specified by:
getSession in interface SessionProvider
repository - the repository to login
workspace - the workspace name
Returns:
the session or null
Throws:
LoginException - if the credentials are invalid
javax.servlet.ServletException - if an error occurrs
RepositoryException

releaseSession

public void releaseSession(Session session)
Informs this provider that the session aquired by a previous SessionProvider.getSession(javax.servlet.http.HttpServletRequest, javax.jcr.Repository, java.lang.String) call is no longer needed.

Specified by:
releaseSession in interface SessionProvider


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.