org.apache.jackrabbit.rmi.server
Class ServerLock

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.apache.jackrabbit.rmi.server.ServerObject
                  extended by org.apache.jackrabbit.rmi.server.ServerLock
All Implemented Interfaces:
Serializable, Remote, RemoteLock

public class ServerLock
extends ServerObject
implements RemoteLock

Remote adapter for the JCR Lock interface. This class makes a local lock available as an RMI service using the RemoteLock interface.

See Also:
Lock, RemoteLock, Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
ServerLock(Lock lock, RemoteAdapterFactory factory)
          Creates a remote adapter for the given local lock.
 
Method Summary
 String getLockOwner()
          Remote version of the Lock.getLockOwner() method.
 String getLockToken()
          Remote version of the Lock.getLockToken() method.
 RemoteNode getNode()
          Remote version of the Lock.getNode() method.
 boolean isDeep()
          Remote version of the Lock.isDeep() method.
 boolean isLive()
          Remote version of the Lock.isLive() method.
 boolean isSessionScoped()
          Remote version of the Lock.isSessionScoped() () Lock.isSessionScoped()} method.
 void refresh()
          Remote version of the Lock.refresh() method.
 
Methods inherited from class org.apache.jackrabbit.rmi.server.ServerObject
getFactory, getRemoteItem, getRemoteNode, getRemoteNodeTypeArray, getRepositoryException, getSerialValue, getSerialValues
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerLock

public ServerLock(Lock lock,
                  RemoteAdapterFactory factory)
           throws RemoteException
Creates a remote adapter for the given local lock.

Parameters:
lock - local lock
Throws:
RemoteException - on RMI errors
Method Detail

getNode

public RemoteNode getNode()
                   throws RemoteException
Remote version of the Lock.getNode() method.

Specified by:
getNode in interface RemoteLock
Returns:
remote node
Throws:
RemoteException - on RMI errors

getLockOwner

public String getLockOwner()
                    throws RemoteException
Remote version of the Lock.getLockOwner() method.

Specified by:
getLockOwner in interface RemoteLock
Returns:
lock owner
Throws:
RemoteException - on RMI errors

isDeep

public boolean isDeep()
               throws RemoteException
Remote version of the Lock.isDeep() method.

Specified by:
isDeep in interface RemoteLock
Returns:
true if the lock is deep, false otherwise
Throws:
RemoteException - on RMI errors

getLockToken

public String getLockToken()
                    throws RemoteException
Remote version of the Lock.getLockToken() method.

Specified by:
getLockToken in interface RemoteLock
Returns:
lock token
Throws:
RemoteException - on RMI errors

isLive

public boolean isLive()
               throws RepositoryException,
                      RemoteException
Remote version of the Lock.isLive() method.

Specified by:
isLive in interface RemoteLock
Returns:
true if the lock is live, false otherwise
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

refresh

public void refresh()
             throws RepositoryException,
                    RemoteException
Remote version of the Lock.refresh() method.

Specified by:
refresh in interface RemoteLock
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

isSessionScoped

public boolean isSessionScoped()
                        throws RemoteException
Remote version of the Lock.isSessionScoped() () Lock.isSessionScoped()} method.

Specified by:
isSessionScoped in interface RemoteLock
Returns:
true if the lock is live, false otherwise
Throws:
RemoteException - on RMI errors


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