org.apache.jackrabbit.webdav.simple
Class DavSessionProviderImpl

java.lang.Object
  extended by org.apache.jackrabbit.webdav.simple.DavSessionProviderImpl
All Implemented Interfaces:
DavSessionProvider

public class DavSessionProviderImpl
extends Object
implements DavSessionProvider

Simple implementation of the DavSessionProvider interface that uses a CredentialsProvider to locate credentials in the request, log into the respository, and provide a DavSession to the request.


Constructor Summary
DavSessionProviderImpl(Repository rep, SessionProvider sesProvider)
          Creates a new DavSessionProviderImpl
 
Method Summary
 boolean attachSession(WebdavRequest request)
          Acquires a DavSession.
 void releaseSession(WebdavRequest request)
          Only removes the DavSession object from the given request object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DavSessionProviderImpl

public DavSessionProviderImpl(Repository rep,
                              SessionProvider sesProvider)
Creates a new DavSessionProviderImpl

Parameters:
rep -
sesProvider -
Method Detail

attachSession

public boolean attachSession(WebdavRequest request)
                      throws DavException
Acquires a DavSession. Upon success, the WebdavRequest will reference that session. A session will not be available if an exception is thrown.

Specified by:
attachSession in interface DavSessionProvider
Parameters:
request -
Returns:
true if the session was attached to the request; false otherwise.
Throws:
DavException - if a problem occurred while obtaining the session
See Also:
DavSessionProvider.attachSession(org.apache.jackrabbit.webdav.WebdavRequest)

releaseSession

public void releaseSession(WebdavRequest request)
Only removes the DavSession object from the given request object. and remove all the lock tokens from the underlying repository session in order make sure they can be reset when attaching a session to the next request. Finally the session provider is informed, that the session is no longer used.

Specified by:
releaseSession in interface DavSessionProvider
Parameters:
request -
See Also:
DavSessionProvider.releaseSession(org.apache.jackrabbit.webdav.WebdavRequest)


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