org.apache.jackrabbit.rmi.repository
Class AbstractRemoteRepositoryFactory

java.lang.Object
  extended by org.apache.jackrabbit.rmi.repository.AbstractRemoteRepositoryFactory
Direct Known Subclasses:
JNDIRemoteRepositoryFactory, RMIRemoteRepositoryFactory, URLRemoteRepositoryFactory

public abstract class AbstractRemoteRepositoryFactory
extends Object

Abstract base class for repository factories that make a remote repository available locally. Subclasses need to implement the getRemoteRepository() method to actually retrieve the remote repository reference.

Since:
1.4

Constructor Summary
protected AbstractRemoteRepositoryFactory(LocalAdapterFactory factory)
          Creates a factory for looking up a repository from the given RMI URL.
 
Method Summary
protected abstract  RemoteRepository getRemoteRepository()
          Returns the remote repository reference.
 Repository getRepository()
          Returns a local adapter for the remote repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRemoteRepositoryFactory

protected AbstractRemoteRepositoryFactory(LocalAdapterFactory factory)
Creates a factory for looking up a repository from the given RMI URL.

Parameters:
factory - local adapter factory
url - RMI URL of the repository
Method Detail

getRepository

public Repository getRepository()
                         throws RepositoryException
Returns a local adapter for the remote repository.

Returns:
local adapter for the remote repository
Throws:
RepositoryException - if the remote repository is not available

getRemoteRepository

protected abstract RemoteRepository getRemoteRepository()
                                                 throws RepositoryException
Returns the remote repository reference.

Returns:
remote repository reference
Throws:
RepositoryException - if the remote repository is not available


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