smbdav
Class SmbLockManager

java.lang.Object
  extended bysmbdav.DefaultLockManager
      extended bysmbdav.SmbLockManager
All Implemented Interfaces:
LockManager

public class SmbLockManager
extends DefaultLockManager


Nested Class Summary
protected  class SmbLockManager.SmbLock
           
 
Nested classes inherited from class smbdav.DefaultLockManager
DefaultLockManager.BasicLock
 
Field Summary
 
Fields inherited from class smbdav.DefaultLockManager
locks, TIMER
 
Fields inherited from interface smbdav.LockManager
EXCLUSIVE_LOCK_SUPPORT, NO_LOCK_SUPPORT, SHARED_LOCK_SUPPORT
 
Constructor Summary
SmbLockManager()
           
SmbLockManager(long defaultTimeout)
           
SmbLockManager(long defaultTimeout, long maximumTimeout)
           
 
Method Summary
protected  DefaultLockManager.BasicLock createLock(jcifs.smb.SmbFile resource, java.security.Principal principal, java.lang.String lockToken, LockInfo lockInfo)
           
 jcifs.smb.SmbFile getLockedResource(jcifs.smb.SmbFile resource, java.security.Principal principal)
          Returns a handle for manipulating a locked SMB resource.
 int getLockSupport(jcifs.smb.SmbFile resource)
          Retrieves the lock support mask for a specified resource.
 
Methods inherited from class smbdav.DefaultLockManager
getActiveLocks, getDefaultTimeout, getMaximumTimeout, isLocked, lock, refresh, setDefaultTimeout, setMaximumTimeout, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmbLockManager

public SmbLockManager()

SmbLockManager

public SmbLockManager(long defaultTimeout)

SmbLockManager

public SmbLockManager(long defaultTimeout,
                      long maximumTimeout)
Method Detail

getLockSupport

public int getLockSupport(jcifs.smb.SmbFile resource)
                   throws java.io.IOException
Description copied from interface: LockManager
Retrieves the lock support mask for a specified resource.

Specified by:
getLockSupport in interface LockManager
Overrides:
getLockSupport in class DefaultLockManager
Throws:
java.io.IOException

getLockedResource

public jcifs.smb.SmbFile getLockedResource(jcifs.smb.SmbFile resource,
                                           java.security.Principal principal)
                                    throws java.io.IOException
Description copied from interface: LockManager
Returns a handle for manipulating a locked SMB resource. A manager enforcing locks at the SMB level will return a singleton SmbFile instance for performing operations against the resource. If such management is not required, this method returns the resource passed in by the caller.

Specified by:
getLockedResource in interface LockManager
Overrides:
getLockedResource in class DefaultLockManager
Throws:
java.io.IOException

createLock

protected DefaultLockManager.BasicLock createLock(jcifs.smb.SmbFile resource,
                                                  java.security.Principal principal,
                                                  java.lang.String lockToken,
                                                  LockInfo lockInfo)
                                           throws java.io.IOException,
                                                  LockException
Overrides:
createLock in class DefaultLockManager
Throws:
java.io.IOException
LockException


Copyright © 2004 Eric Glass