public class ClientRepositoryFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory
ClientRepository
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
URL_PARAMETER
The JNDI parameter name for configuring the RMI URL of
a remote repository.
|
Constructor and Description |
---|
ClientRepositoryFactory()
Creates a JCR-RMI client factory with the default adapter factory.
|
ClientRepositoryFactory(LocalAdapterFactory factory)
Creates a JCR-RMI client factory with the given adapter factory.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getObjectInstance(java.lang.Object object,
javax.naming.Name name,
javax.naming.Context context,
java.util.Hashtable environment)
JNDI factory method for creating JCR-RMI clients.
|
Repository |
getRepository(java.lang.String url)
Returns a client wrapper for a remote content repository.
|
public static final java.lang.String URL_PARAMETER
public ClientRepositoryFactory()
public ClientRepositoryFactory(LocalAdapterFactory factory)
factory
- local adapter factorypublic Repository getRepository(java.lang.String url) throws java.net.MalformedURLException, java.rmi.NotBoundException, java.lang.ClassCastException, java.rmi.RemoteException
SafeClientRepository
instance.
The current implementation of this method will not throw any of the
declared exceptions (because of the SafeClientRepository
being
used), but the throws clauses are kept for backwards compatibility and
potential future use. Clients should be prepared to handle exceptions
from this method.
url
- the RMI URL of the remote repositoryjava.net.MalformedURLException
- if the given URL is malforedjava.rmi.NotBoundException
- if the given URL points to nothingjava.lang.ClassCastException
- if the given URL points to something unknownjava.rmi.RemoteException
- if the remote repository can not be accessedpublic java.lang.Object getObjectInstance(java.lang.Object object, javax.naming.Name name, javax.naming.Context context, java.util.Hashtable environment)
getObjectInstance
in interface javax.naming.spi.ObjectFactory
object
- reference parametersname
- unusedcontext
- unusedenvironment
- unused"Copyright © 2010 - 2019 Adobe Systems Incorporated. All Rights Reserved"