Interface LockingCollectionResource

  • All Superinterfaces:
    CollectionResource, LockableResource, Resource

    public interface LockingCollectionResource
    extends CollectionResource, LockableResource
    A collection which allows locking "unmapped resources". This means that a LOCK method can effectively create an empty resource which is immediately locked. Implement this in conjunction with {@see LockableResource} on child resources to fully support locking.

    Note that this interface now extends {@see LockableResource} because collection resources need to implement both in most cases.

    If, however, you don't want your collection resources to be lockable, just implement {@see ConditionalCompatibleResource}.

    See http://www.ettrema.com:8080/browse/MIL-14.

    • Method Detail

      • createAndLock

        LockToken createAndLock​(String name,
                                LockTimeout timeout,
                                LockInfo lockInfo)
                         throws io.milton.http.exceptions.NotAuthorizedException
        Create an empty non-collection resource of the given name and immediately lock it.

        It is suggested that the implementor have a specific Resource class to act as the lock null resource. You should consider using the {@see LockNullResource} interface.

        Parameters:
        name - - the name of the resource to create
        timeout - - in seconds
        lockInfo -
        Returns:
        Throws:
        io.milton.http.exceptions.NotAuthorizedException
        See Also:
        LockNullResource