org.apache.jackrabbit.rmi.server
Class ServerRepository

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.ServerRepository
All Implemented Interfaces:
Serializable, Remote, RemoteRepository

public class ServerRepository
extends ServerObject
implements RemoteRepository

Remote adapter for the JCR Repository interface. This class makes a local repository available as an RMI service using the RemoteRepository interface.

See Also:
Repository, RemoteRepository, Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
ServerRepository(Repository repository, RemoteAdapterFactory factory)
          Creates a remote adapter for the given local repository.
 
Method Summary
 String getDescriptor(String name)
          Remote version of the Repository.getDescriptor(String) method.
 String[] getDescriptorKeys()
          Remote version of the Repository.getDescriptorKeys() method.
 RemoteSession login()
          Remote version of the Repository.login(} method.
 RemoteSession login(Credentials credentials)
          Remote version of the Repository.login(Credentials} method.
 RemoteSession login(Credentials credentials, String workspace)
          Remote version of the Repository.login(Credentials,String} method.
 RemoteSession login(String workspace)
          Remote version of the Repository.login(String} 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

ServerRepository

public ServerRepository(Repository repository,
                        RemoteAdapterFactory factory)
                 throws RemoteException
Creates a remote adapter for the given local repository.

Parameters:
repository - local repository
factory - remote adapter factory
Throws:
RemoteException - on RMI errors
Method Detail

getDescriptor

public String getDescriptor(String name)
                     throws RemoteException
Remote version of the Repository.getDescriptor(String) method.

Specified by:
getDescriptor in interface RemoteRepository
Parameters:
name - descriptor key
Returns:
descriptor value
Throws:
RemoteException - on RMI errors

getDescriptorKeys

public String[] getDescriptorKeys()
                           throws RemoteException
Remote version of the Repository.getDescriptorKeys() method.

Specified by:
getDescriptorKeys in interface RemoteRepository
Returns:
descriptor keys
Throws:
RemoteException - on RMI errors

login

public RemoteSession login()
                    throws RepositoryException,
                           RemoteException
Remote version of the Repository.login(} method.

Specified by:
login in interface RemoteRepository
Returns:
remote session
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

login

public RemoteSession login(String workspace)
                    throws RepositoryException,
                           RemoteException
Remote version of the Repository.login(String} method.

Specified by:
login in interface RemoteRepository
Parameters:
workspace - workspace name
Returns:
remote session
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

login

public RemoteSession login(Credentials credentials)
                    throws RepositoryException,
                           RemoteException
Remote version of the Repository.login(Credentials} method.

Specified by:
login in interface RemoteRepository
Parameters:
credentials - client credentials
Returns:
remote session
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

login

public RemoteSession login(Credentials credentials,
                           String workspace)
                    throws RepositoryException,
                           RemoteException
Remote version of the Repository.login(Credentials,String} method.

Specified by:
login in interface RemoteRepository
Parameters:
credentials - client credentials
workspace - workspace name
Returns:
remote session
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors


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