Click or drag to resize

ILockAsync Interface

IT Hit WebDAV Classes Reference
Defines the properties and methods that WebDAV Class 2 compliant server hierarchy items must implement.

Namespace:  ITHit.WebDAV.Server.Class2
Assembly:  ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 11.3.10719
Syntax
public interface ILockAsync

public interface ILockAsync

The ILockAsync type exposes the following members.

Methods
  NameDescription
Public methodCode exampleGetActiveLocksAsync
Gets the IEnumerableT with all locks for this item.
Public methodCode exampleLockAsync
Locks this item.
Public methodCode exampleRefreshLockAsync
Updates lock timeout information on this item.
Public methodCode exampleUnlockAsync
Removes lock with the specified token from this item.
Top
Remarks

This interface provides the means for locking the hierarchy item, updating lock timeout and accessing the list of applied locks. To create WebDAV Class 2 compliant server you must implement this interface on your file and folder items.

When this interface is implemented on an item the server reports Class 2 compliance, returning DAV: 1, 2, 3 header in response to the OPTIONS request. Note that while most WebDAV clients never lock folder items, you must still add this interface on folders, as soon as WebDAV clients submit OPTIONS request against folder items when discovering server compliance.

When a WebDAV client requires to protect an item from concurrent updates, it locks the item (usually file), submitting lock request to server. The server generates the new lock-token, marks the item as locked and returns the new lock-token to the client. The WebDAV client application keeps the lock-token and when it requires to perform any updates, it supplies the lock-token with the request. When the server receives the update request, it verifies that the lock token belongs to the item that is being updated and performs modifications.

See Also