smbdav
Class DefaultLockManager.BasicLock

java.lang.Object
  extended bysmbdav.LockInfo
      extended bysmbdav.Lock
          extended bysmbdav.DefaultLockManager.BasicLock
Direct Known Subclasses:
SmbLockManager.SmbLock
Enclosing class:
DefaultLockManager

protected class DefaultLockManager.BasicLock
extends Lock


Constructor Summary
DefaultLockManager.BasicLock(jcifs.smb.SmbFile resource, java.security.Principal principal, java.lang.String token, LockInfo lockInfo)
           
 
Method Summary
 java.security.Principal getPrincipal()
          Returns the principal owning this lock.
 jcifs.smb.SmbFile getResource()
           
 java.lang.String getToken()
          Returns the token associated with this lock.
 void refresh(long timeout)
           
 void setTimeout(long timeout)
          Sets the lock timeout value in milliseconds.
 void unlock()
           
 
Methods inherited from class smbdav.Lock
toString
 
Methods inherited from class smbdav.LockInfo
getDepth, getOwner, getTimeout, isExclusive, setDepth, setExclusive, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultLockManager.BasicLock

public DefaultLockManager.BasicLock(jcifs.smb.SmbFile resource,
                                    java.security.Principal principal,
                                    java.lang.String token,
                                    LockInfo lockInfo)
                             throws java.io.IOException
Method Detail

getResource

public jcifs.smb.SmbFile getResource()

getToken

public java.lang.String getToken()
Description copied from class: Lock
Returns the token associated with this lock.

Specified by:
getToken in class Lock
Returns:
A String containing the associated lock token URI (typically an "opaquelocktoken" URI).

getPrincipal

public java.security.Principal getPrincipal()
Description copied from class: Lock
Returns the principal owning this lock.

Specified by:
getPrincipal in class Lock
Returns:
A Principal representing the lock owner.

setTimeout

public void setTimeout(long timeout)
Description copied from class: LockInfo
Sets the lock timeout value in milliseconds.

Overrides:
setTimeout in class LockInfo
Parameters:
timeout - The timeout value. This should be a value in milliseconds, or one of SmbDAVUtilities.UNSPECIFIED_TIMEOUT (if no timeout is specified) or SmbDAVUtilities.INFINITE_TIMEOUT (if an infinite timeout is specified).

refresh

public void refresh(long timeout)
             throws java.io.IOException
Throws:
java.io.IOException

unlock

public void unlock()
            throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2004 Eric Glass