|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.rmi.server.ServerAdapterFactory
public class ServerAdapterFactory
Default implementation of the
RemoteAdapterFactory interface.
This factory uses the server adapters defined in this package as
the default adapter implementations. Subclasses can override or extend
the default adapters by implementing the corresponding factory methods.
The bufferSize property can be used to configure the
size of the buffer used by iterators to speed up iterator traversal
over the network.
| Constructor Summary | |
|---|---|
ServerAdapterFactory()
|
|
| Method Summary | |
|---|---|
int |
getBufferSize()
Returns the iterator buffer size. |
RemoteEventCollection |
getRemoteEvent(long listenerId,
javax.jcr.observation.EventIterator events)
Creates a ServerEventCollection instances. |
RemoteItem |
getRemoteItem(javax.jcr.Item item)
Creates a ServerItem instance. |
RemoteItemDefinition |
getRemoteItemDefinition(javax.jcr.nodetype.ItemDefinition def)
Creates a ServerItemDefinition instance. |
RemoteLock |
getRemoteLock(javax.jcr.lock.Lock lock)
Creates a ServerLock instance. |
RemoteNamespaceRegistry |
getRemoteNamespaceRegistry(javax.jcr.NamespaceRegistry registry)
Creates a ServerNamespaceRegistry
instance. |
RemoteNode |
getRemoteNode(javax.jcr.Node node)
Creates a ServerNode instance. |
RemoteNodeDefinition |
getRemoteNodeDefinition(javax.jcr.nodetype.NodeDefinition def)
Creates a ServerNodeDefinition instance. |
RemoteIterator |
getRemoteNodeIterator(javax.jcr.NodeIterator iterator)
Creates a ServerNodeIterator instance. |
RemoteNodeType |
getRemoteNodeType(javax.jcr.nodetype.NodeType type)
Creates a ServerNodeType instance. |
RemoteIterator |
getRemoteNodeTypeIterator(javax.jcr.nodetype.NodeTypeIterator iterator)
Creates a ServerNodeTypeIterator instance. |
RemoteNodeTypeManager |
getRemoteNodeTypeManager(javax.jcr.nodetype.NodeTypeManager manager)
Creates a ServerNodeTypeManager instance. |
RemoteObservationManager |
getRemoteObservationManager(javax.jcr.observation.ObservationManager observationManager)
Creates a ServerObservationManager
instance. |
RemoteProperty |
getRemoteProperty(javax.jcr.Property property)
Creates a ServerProperty instance. |
RemotePropertyDefinition |
getRemotePropertyDefinition(javax.jcr.nodetype.PropertyDefinition def)
Creates a ServerPropertyDefinition instance. |
RemoteIterator |
getRemotePropertyIterator(javax.jcr.PropertyIterator iterator)
Creates a ServerPropertyIterator instance. |
RemoteQuery |
getRemoteQuery(javax.jcr.query.Query query)
Creates a ServerQuery instance. |
RemoteQueryManager |
getRemoteQueryManager(javax.jcr.query.QueryManager manager)
Creates a ServerQueryManager instance. |
RemoteQueryResult |
getRemoteQueryResult(javax.jcr.query.QueryResult result)
Creates a ServerQueryResult instance. |
RemoteRepository |
getRemoteRepository(javax.jcr.Repository repository)
Creates a ServerRepository instance. |
RemoteRow |
getRemoteRow(javax.jcr.query.Row row)
Creates a ServerQueryResult instance. |
RemoteIterator |
getRemoteRowIterator(javax.jcr.query.RowIterator iterator)
Creates a ServerRowIterator instance. |
RemoteSession |
getRemoteSession(javax.jcr.Session session)
Creates a ServerSession instance. |
RemoteVersion |
getRemoteVersion(javax.jcr.version.Version version)
Creates a ServerVersion instance. |
RemoteVersionHistory |
getRemoteVersionHistory(javax.jcr.version.VersionHistory versionHistory)
Creates a ServerVersionHistory instance. |
RemoteIterator |
getRemoteVersionIterator(javax.jcr.version.VersionIterator iterator)
Creates a ServerVersionIterator instance. |
RemoteWorkspace |
getRemoteWorkspace(javax.jcr.Workspace workspace)
Creates a ServerWorkspace instance. |
RemoteXAResource |
getRemoteXAResource(javax.transaction.xa.XAResource resource)
Creates a ServerXAResource instance. |
protected RemoteIterator |
optimizeIterator(RemoteIterator remote)
Optimizes the given remote iterator for transmission across the network. |
void |
setBufferSize(int bufferSize)
Sets the iterator buffer size. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerAdapterFactory()
| Method Detail |
|---|
public int getBufferSize()
public void setBufferSize(int bufferSize)
bufferSize - iterator buffer size
public RemoteRepository getRemoteRepository(javax.jcr.Repository repository)
throws java.rmi.RemoteException
ServerRepository instance.
Returns a remote adapter for the given local repository.
getRemoteRepository in interface RemoteAdapterFactoryrepository - local repository
java.rmi.RemoteException - on RMI errors
public RemoteSession getRemoteSession(javax.jcr.Session session)
throws java.rmi.RemoteException
ServerSession instance.
In case the underlying session is transaction enabled, the
remote interface is will be transaction enabled too through
the ServerXASession.
Returns a remote adapter for the given local session.
getRemoteSession in interface RemoteAdapterFactorysession - local session
java.rmi.RemoteException - on RMI errors
public RemoteWorkspace getRemoteWorkspace(javax.jcr.Workspace workspace)
throws java.rmi.RemoteException
ServerWorkspace instance.
Returns a remote adapter for the given local workspace.
getRemoteWorkspace in interface RemoteAdapterFactoryworkspace - local workspace
java.rmi.RemoteException - on RMI errors
public RemoteObservationManager getRemoteObservationManager(javax.jcr.observation.ObservationManager observationManager)
throws java.rmi.RemoteException
ServerObservationManager
instance.
Returns a remote adapter for the given local observation manager.
getRemoteObservationManager in interface RemoteAdapterFactoryobservationManager - local observation manager
java.rmi.RemoteException - on RMI errors
public RemoteNamespaceRegistry getRemoteNamespaceRegistry(javax.jcr.NamespaceRegistry registry)
throws java.rmi.RemoteException
ServerNamespaceRegistry
instance.
Returns a remote adapter for the given local namespace registry.
getRemoteNamespaceRegistry in interface RemoteAdapterFactoryregistry - local namespace registry
java.rmi.RemoteException - on RMI errors
public RemoteNodeTypeManager getRemoteNodeTypeManager(javax.jcr.nodetype.NodeTypeManager manager)
throws java.rmi.RemoteException
ServerNodeTypeManager instance.
Returns a remote adapter for the given local node type manager.
getRemoteNodeTypeManager in interface RemoteAdapterFactorymanager - local node type manager
java.rmi.RemoteException - on RMI errors
public RemoteItem getRemoteItem(javax.jcr.Item item)
throws java.rmi.RemoteException
ServerItem instance.
Returns a remote adapter for the given local item. This method
will return an adapter that implements only the
Item interface. The caller may want to introspect
the local item to determine whether to use either the
getRemoteNode or the
getRemoteProperty method instead.
getRemoteItem in interface RemoteAdapterFactoryitem - local item
java.rmi.RemoteException - on RMI errors
public RemoteProperty getRemoteProperty(javax.jcr.Property property)
throws java.rmi.RemoteException
ServerProperty instance.
Returns a remote adapter for the given local property.
getRemoteProperty in interface RemoteAdapterFactoryproperty - local property
java.rmi.RemoteException - on RMI errors
public RemoteNode getRemoteNode(javax.jcr.Node node)
throws java.rmi.RemoteException
ServerNode instance.
Returns a remote adapter for the given local node.
getRemoteNode in interface RemoteAdapterFactorynode - local node
java.rmi.RemoteException - on RMI errors
public RemoteVersion getRemoteVersion(javax.jcr.version.Version version)
throws java.rmi.RemoteException
ServerVersion instance.
Returns a remote adapter for the given local version.
getRemoteVersion in interface RemoteAdapterFactoryversion - local version
java.rmi.RemoteException - on RMI errors
public RemoteVersionHistory getRemoteVersionHistory(javax.jcr.version.VersionHistory versionHistory)
throws java.rmi.RemoteException
ServerVersionHistory instance.
Returns a remote adapter for the given local version history.
getRemoteVersionHistory in interface RemoteAdapterFactoryversionHistory - local version history
java.rmi.RemoteException - on RMI errors
public RemoteNodeType getRemoteNodeType(javax.jcr.nodetype.NodeType type)
throws java.rmi.RemoteException
ServerNodeType instance.
Returns a remote adapter for the given local node type.
getRemoteNodeType in interface RemoteAdapterFactorytype - local node type
java.rmi.RemoteException - on RMI errors
public RemoteItemDefinition getRemoteItemDefinition(javax.jcr.nodetype.ItemDefinition def)
throws java.rmi.RemoteException
ServerItemDefinition instance.
Returns a remote adapter for the given local item definition.
This method will return an adapter that implements only the
ItemDefinition interface. The caller may want to introspect
the local item definition to determine whether to use either the
getRemoteNodeDef or the
getRemotePropertyDef
method instead.
getRemoteItemDefinition in interface RemoteAdapterFactorydef - local item definition
java.rmi.RemoteException - on RMI errors
public RemoteNodeDefinition getRemoteNodeDefinition(javax.jcr.nodetype.NodeDefinition def)
throws java.rmi.RemoteException
ServerNodeDefinition instance.
Returns a remote adapter for the given local node definition.
getRemoteNodeDefinition in interface RemoteAdapterFactorydef - local node definition
java.rmi.RemoteException - on RMI errors
public RemotePropertyDefinition getRemotePropertyDefinition(javax.jcr.nodetype.PropertyDefinition def)
throws java.rmi.RemoteException
ServerPropertyDefinition instance.
Returns a remote adapter for the given local property definition.
getRemotePropertyDefinition in interface RemoteAdapterFactorydef - local property definition
java.rmi.RemoteException - on RMI errors
public RemoteLock getRemoteLock(javax.jcr.lock.Lock lock)
throws java.rmi.RemoteException
ServerLock instance.
Returns a remote adapter for the given local lock.
getRemoteLock in interface RemoteAdapterFactorylock - local lock
java.rmi.RemoteException - on RMI errors
public RemoteQueryManager getRemoteQueryManager(javax.jcr.query.QueryManager manager)
throws java.rmi.RemoteException
ServerQueryManager instance.
Returns a remote adapter for the given local query manager.
getRemoteQueryManager in interface RemoteAdapterFactorymanager - local query manager
java.rmi.RemoteException - on RMI errors
public RemoteQuery getRemoteQuery(javax.jcr.query.Query query)
throws java.rmi.RemoteException
ServerQuery instance.
Returns a remote adapter for the given local query.
getRemoteQuery in interface RemoteAdapterFactoryquery - local query
java.rmi.RemoteException - on RMI errors
public RemoteQueryResult getRemoteQueryResult(javax.jcr.query.QueryResult result)
throws java.rmi.RemoteException
ServerQueryResult instance.
Returns a remote adapter for the given local query result.
getRemoteQueryResult in interface RemoteAdapterFactoryresult - local query result
java.rmi.RemoteException - on RMI errors
public RemoteRow getRemoteRow(javax.jcr.query.Row row)
throws java.rmi.RemoteException
ServerQueryResult instance.
Returns a remote adapter for the given local query row.
getRemoteRow in interface RemoteAdapterFactoryrow - local query row
java.rmi.RemoteException - on RMI errors
public RemoteEventCollection getRemoteEvent(long listenerId,
javax.jcr.observation.EventIterator events)
throws java.rmi.RemoteException
ServerEventCollection instances.
Returns a remote adapter for the given local events.
getRemoteEvent in interface RemoteAdapterFactorylistenerId - The listener identifier to which the events are to be
dispatched.events - the local events
java.rmi.RemoteException - on RMI errors
protected RemoteIterator optimizeIterator(RemoteIterator remote)
throws java.rmi.RemoteException
RemoteIterator.nextObjects() and
then asks for the total size of the iterator. If the size is unkown
or greater than the length of the retrieved array, then the elements,
the size, and the remote iterator reference are wrapped into a
BufferIterator instance that gets passed over the network.
If the retrieved array of elements contains all the elements in the
iterator, then the iterator instance is discarded and just the elements
are wrapped into a ArrayIterator instance to be passed to the
client.
Subclasses can override this method to provide alternative optimizations.
remote - remote iterator
java.rmi.RemoteException - on RMI errors
public RemoteIterator getRemoteNodeIterator(javax.jcr.NodeIterator iterator)
throws java.rmi.RemoteException
ServerNodeIterator instance. Returns a remote adapter for the given local node iterator.
getRemoteNodeIterator in interface RemoteAdapterFactoryiterator - local node iterator
java.rmi.RemoteException - on RMI errors
public RemoteIterator getRemotePropertyIterator(javax.jcr.PropertyIterator iterator)
throws java.rmi.RemoteException
ServerPropertyIterator instance. Returns a remote adapter for the given local property iterator.
getRemotePropertyIterator in interface RemoteAdapterFactoryiterator - local property iterator
java.rmi.RemoteException - on RMI errors
public RemoteIterator getRemoteVersionIterator(javax.jcr.version.VersionIterator iterator)
throws java.rmi.RemoteException
ServerVersionIterator instance. Returns a remote adapter for the given local version iterator.
getRemoteVersionIterator in interface RemoteAdapterFactoryiterator - local version iterator
java.rmi.RemoteException - on RMI errors
public RemoteIterator getRemoteNodeTypeIterator(javax.jcr.nodetype.NodeTypeIterator iterator)
throws java.rmi.RemoteException
ServerNodeTypeIterator instance. Returns a remote adapter for the given local node type iterator.
getRemoteNodeTypeIterator in interface RemoteAdapterFactoryiterator - local node type iterator
java.rmi.RemoteException - on RMI errors
public RemoteIterator getRemoteRowIterator(javax.jcr.query.RowIterator iterator)
throws java.rmi.RemoteException
ServerRowIterator instance. Returns a remote adapter for the given local row iterator.
getRemoteRowIterator in interface RemoteAdapterFactoryiterator - local row iterator
java.rmi.RemoteException - on RMI errors
public RemoteXAResource getRemoteXAResource(javax.transaction.xa.XAResource resource)
throws java.rmi.RemoteException
ServerXAResource instance.
getRemoteXAResource in interface RemoteAdapterFactoryjava.rmi.RemoteException - on RMI errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||