smbdav
Class LockInfo

java.lang.Object
  extended bysmbdav.LockInfo
Direct Known Subclasses:
Lock

public class LockInfo
extends java.lang.Object

Represents information associated with a lock.

Author:
Eric Glass

Constructor Summary
LockInfo()
           
 
Method Summary
 int getDepth()
          Retrieves the lock depth.
 org.w3c.dom.DocumentFragment getOwner()
          Returns the lock owner information.
 long getTimeout()
          Returns the lock timeout value in milliseconds.
 boolean isExclusive()
          Indicates whether the lock is exclusive.
 void setDepth(int depth)
          Sets the lock depth.
 void setExclusive(boolean exclusive)
          Sets the lock to be exclusive or shared.
 void setOwner(org.w3c.dom.DocumentFragment owner)
          Sets the lock owner information.
 void setTimeout(long timeout)
          Sets the lock timeout value in milliseconds.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockInfo

public LockInfo()
Method Detail

isExclusive

public boolean isExclusive()
Indicates whether the lock is exclusive.

Returns:
A boolean indicating whether this is an exclusive (true) or shared (false) lock.

setExclusive

public void setExclusive(boolean exclusive)
Sets the lock to be exclusive or shared.

Parameters:
exclusive - Indicates whether the lock should be exclusive (true) or shared (false).

getOwner

public org.w3c.dom.DocumentFragment getOwner()
Returns the lock owner information.

Returns:
A DocumentFragment containing the XML fragment representing the lock owner information.

setOwner

public void setOwner(org.w3c.dom.DocumentFragment owner)
Sets the lock owner information.

Parameters:
owner - The XML fragment representing the lock owner information.

getDepth

public int getDepth()
Retrieves the lock depth.

Returns:
An int indicating the lock depth. Should be either SmbDAVUtilities.RESOURCE_ONLY_DEPTH or SmbDAVUtilities.INFINITE_DEPTH.

setDepth

public void setDepth(int depth)
Sets the lock depth.

Parameters:
depth - The lock depth. One of SmbDAVUtilities.RESOURCE_ONLY_DEPTH or SmbDAVUtilities.INFINITE_DEPTH.

getTimeout

public long getTimeout()
Returns the lock timeout value in milliseconds.

Returns:
A long containing the lock timeout value. If no timeout has been specified, this will be SmbDAVUtilities.UNSPECIFIED_TIMEOUT. If an infinite timeout has been specified, this will be SmbDAVUtilities.INFINITE_TIMEOUT.

setTimeout

public void setTimeout(long timeout)
Sets the lock timeout value in milliseconds.

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).

toString

public java.lang.String toString()


Copyright © 2004 Eric Glass