org.apache.jackrabbit.rmi.client
Class ClientLock

java.lang.Object
  extended by org.apache.jackrabbit.rmi.client.ClientObject
      extended by org.apache.jackrabbit.rmi.client.ClientLock
All Implemented Interfaces:
javax.jcr.lock.Lock

public class ClientLock
extends ClientObject
implements javax.jcr.lock.Lock

Local adapter for the JCR-RMI RemoteLock interface. This class makes a remote lock locally available using the JCR Lock interface.

See Also:
Lock, RemoteLock

Constructor Summary
ClientLock(javax.jcr.Session session, RemoteLock remote, LocalAdapterFactory factory)
          Creates a local adapter for the given remote lock.
 
Method Summary
 String getLockOwner()
          
 String getLockToken()
          
 javax.jcr.Node getNode()
          
 long getSecondsRemaining()
           
 boolean isDeep()
          
 boolean isLive()
          
 boolean isLockOwningSession()
           
 boolean isSessionScoped()
          
 void refresh()
          
 
Methods inherited from class org.apache.jackrabbit.rmi.client.ClientObject
getFactory, getItem, getNode, getNodeTypeArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientLock

public ClientLock(javax.jcr.Session session,
                  RemoteLock remote,
                  LocalAdapterFactory factory)
Creates a local adapter for the given remote lock.

Parameters:
session - current session
remote - remote lock
factory - local adapter factory
Method Detail

getNode

public javax.jcr.Node getNode()

Specified by:
getNode in interface javax.jcr.lock.Lock

getLockOwner

public String getLockOwner()

Specified by:
getLockOwner in interface javax.jcr.lock.Lock

isDeep

public boolean isDeep()

Specified by:
isDeep in interface javax.jcr.lock.Lock

getLockToken

public String getLockToken()

Specified by:
getLockToken in interface javax.jcr.lock.Lock

isLive

public boolean isLive()
               throws javax.jcr.RepositoryException

Specified by:
isLive in interface javax.jcr.lock.Lock
Throws:
javax.jcr.RepositoryException

refresh

public void refresh()
             throws javax.jcr.RepositoryException

Specified by:
refresh in interface javax.jcr.lock.Lock
Throws:
javax.jcr.RepositoryException

isSessionScoped

public boolean isSessionScoped()

Specified by:
isSessionScoped in interface javax.jcr.lock.Lock

getSecondsRemaining

public long getSecondsRemaining()
                         throws javax.jcr.RepositoryException
Specified by:
getSecondsRemaining in interface javax.jcr.lock.Lock
Throws:
javax.jcr.RepositoryException

isLockOwningSession

public boolean isLockOwningSession()
Specified by:
isLockOwningSession in interface javax.jcr.lock.Lock


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.