public interface LockableResource extends Resource
| Modifier and Type | Method and Description |
|---|---|
LockToken |
getCurrentLock() |
LockResult |
lock(LockTimeout timeout,
LockInfo lockInfo)
Lock this resource and return a token
|
LockResult |
refreshLock(String token)
Renew the lock and return new lock info
|
void |
unlock(String tokenId)
If the resource is currently locked, and the tokenId matches the current
one, unlock the resource
|
authenticate, authorise, checkRedirect, getModifiedDate, getName, getRealm, getUniqueIdLockResult lock(LockTimeout timeout, LockInfo lockInfo) throws io.milton.http.exceptions.NotAuthorizedException, io.milton.http.exceptions.PreConditionFailedException, io.milton.http.exceptions.LockedException
timeout - - in seconds, or nulllockInfo - io.milton.http.exceptions.NotAuthorizedExceptionio.milton.http.exceptions.PreConditionFailedExceptionio.milton.http.exceptions.LockedExceptionLockResult refreshLock(String token) throws io.milton.http.exceptions.NotAuthorizedException, io.milton.http.exceptions.PreConditionFailedException
token - io.milton.http.exceptions.NotAuthorizedExceptionio.milton.http.exceptions.PreConditionFailedExceptionvoid unlock(String tokenId) throws io.milton.http.exceptions.NotAuthorizedException, io.milton.http.exceptions.PreConditionFailedException
tokenId - io.milton.http.exceptions.NotAuthorizedExceptionio.milton.http.exceptions.PreConditionFailedExceptionLockToken getCurrentLock()