Class ClientRepositoryFactory

  • All Implemented Interfaces:
    ObjectFactory

    @Deprecated(forRemoval=true)
    public class ClientRepositoryFactory
    extends Object
    implements ObjectFactory
    Deprecated, for removal: This API element is subject to removal in a future version.
    RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.

    Object factory for JCR-RMI clients. This factory can be used either directly or as a JNDI object factory.

    See Also:
    ClientRepository
    • Field Detail

      • URL_PARAMETER

        public static final String URL_PARAMETER
        Deprecated, for removal: This API element is subject to removal in a future version.
        The JNDI parameter name for configuring the RMI URL of a remote repository.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ClientRepositoryFactory

        public ClientRepositoryFactory()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a JCR-RMI client factory with the default adapter factory.
      • ClientRepositoryFactory

        public ClientRepositoryFactory​(LocalAdapterFactory factory)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a JCR-RMI client factory with the given adapter factory.
        Parameters:
        factory - local adapter factory
    • Method Detail

      • getRepository

        public Repository getRepository​(String url)
                                 throws MalformedURLException,
                                        NotBoundException,
                                        ClassCastException,
                                        RemoteException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns a client wrapper for a remote content repository. The remote repository is looked up from the RMI registry using the given URL by the returned 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.

        Parameters:
        url - the RMI URL of the remote repository
        Returns:
        repository client
        Throws:
        MalformedURLException - if the given URL is malfored
        NotBoundException - if the given URL points to nothing
        ClassCastException - if the given URL points to something unknown
        RemoteException - if the remote repository can not be accessed
      • getObjectInstance

        public Object getObjectInstance​(Object object,
                                        Name name,
                                        Context context,
                                        Hashtable environment)
        Deprecated, for removal: This API element is subject to removal in a future version.
        JNDI factory method for creating JCR-RMI clients. Creates a lazy client repository instance that uses the reference parameter "url" as the RMI URL where the remote repository is looked up when accessed.
        Specified by:
        getObjectInstance in interface ObjectFactory
        Parameters:
        object - reference parameters
        name - unused
        context - unused
        environment - unused
        Returns:
        repository client