org.apache.jackrabbit.rmi.server
Class ServerNamespaceRegistry

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

public class ServerNamespaceRegistry
extends ServerObject
implements RemoteNamespaceRegistry

Remote adapter for the JCR NamespaceRegistry interface. This class makes a local namespace registry available as an RMI service using the RemoteNamespaceRegistry interface.

See Also:
NamespaceRegistry, RemoteNamespaceRegistry, Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
ServerNamespaceRegistry(NamespaceRegistry registry, RemoteAdapterFactory factory)
          Creates a remote adapter for the given local namespace registry.
 
Method Summary
 String getPrefix(String uri)
          Remote version of the NamespaceRegistry.getPrefix(String) method.
 String[] getPrefixes()
          Remote version of the NamespaceRegistry.getPrefixes() method.
 String getURI(String prefix)
          Remote version of the NamespaceRegistry.getURI(String) method.
 String[] getURIs()
          Remote version of the NamespaceRegistry,getURIs() method.
 void registerNamespace(String prefix, String uri)
          Remote version of the NamespaceRegistry.registerNamespace(String,String) method.
 void unregisterNamespace(String prefix)
          Remote version of the NamespaceRegistry.unregisterNamespace(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

ServerNamespaceRegistry

public ServerNamespaceRegistry(NamespaceRegistry registry,
                               RemoteAdapterFactory factory)
                        throws RemoteException
Creates a remote adapter for the given local namespace registry.

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

registerNamespace

public void registerNamespace(String prefix,
                              String uri)
                       throws RepositoryException,
                              RemoteException
Remote version of the NamespaceRegistry.registerNamespace(String,String) method.

Specified by:
registerNamespace in interface RemoteNamespaceRegistry
Parameters:
prefix - namespace prefix
uri - namespace uri
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

unregisterNamespace

public void unregisterNamespace(String prefix)
                         throws RepositoryException,
                                RemoteException
Remote version of the NamespaceRegistry.unregisterNamespace(String) method.

Specified by:
unregisterNamespace in interface RemoteNamespaceRegistry
Parameters:
prefix - namespace prefix
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getPrefixes

public String[] getPrefixes()
                     throws RepositoryException,
                            RemoteException
Remote version of the NamespaceRegistry.getPrefixes() method.

Specified by:
getPrefixes in interface RemoteNamespaceRegistry
Returns:
namespace prefixes
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getURIs

public String[] getURIs()
                 throws RepositoryException,
                        RemoteException
Remote version of the NamespaceRegistry,getURIs() method.

Specified by:
getURIs in interface RemoteNamespaceRegistry
Returns:
namespace uris
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getURI

public String getURI(String prefix)
              throws RepositoryException,
                     RemoteException
Remote version of the NamespaceRegistry.getURI(String) method.

Specified by:
getURI in interface RemoteNamespaceRegistry
Parameters:
prefix - namespace prefix
Returns:
namespace uri
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors

getPrefix

public String getPrefix(String uri)
                 throws RepositoryException,
                        RemoteException
Remote version of the NamespaceRegistry.getPrefix(String) method.

Specified by:
getPrefix in interface RemoteNamespaceRegistry
Parameters:
uri - namespace uri
Returns:
namespace prefix
Throws:
RepositoryException - on repository errors
RemoteException - on RMI errors


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.