|
||||||||||
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()
|
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 sizepublic int getPortNumber()
getPortNumber
in interface RemoteAdapterFactory
public void setPortNumber(int portNumber)
portNumber
- port number, or 0 for the defaultpublic RemoteRepository getRemoteRepository(Repository repository) throws RemoteException
ServerRepository
instance.
Returns a remote adapter for the given local repository.
getRemoteRepository
in interface RemoteAdapterFactory
repository
- local repository
RemoteException
- on RMI errorspublic RemoteSession getRemoteSession(Session session) throws 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 RemoteAdapterFactory
session
- local session
RemoteException
- on RMI errorspublic RemoteWorkspace getRemoteWorkspace(Workspace workspace) throws RemoteException
ServerWorkspace
instance.
Returns a remote adapter for the given local workspace.
getRemoteWorkspace
in interface RemoteAdapterFactory
workspace
- local workspace
RemoteException
- on RMI errorspublic RemoteObservationManager getRemoteObservationManager(ObservationManager observationManager) throws RemoteException
ServerObservationManager
instance.
Returns a remote adapter for the given local observation manager.
getRemoteObservationManager
in interface RemoteAdapterFactory
observationManager
- local observation manager
RemoteException
- on RMI errorspublic RemoteNamespaceRegistry getRemoteNamespaceRegistry(NamespaceRegistry registry) throws RemoteException
ServerNamespaceRegistry
instance.
Returns a remote adapter for the given local namespace registry.
getRemoteNamespaceRegistry
in interface RemoteAdapterFactory
registry
- local namespace registry
RemoteException
- on RMI errorspublic RemoteNodeTypeManager getRemoteNodeTypeManager(NodeTypeManager manager) throws RemoteException
ServerNodeTypeManager
instance.
Returns a remote adapter for the given local node type manager.
getRemoteNodeTypeManager
in interface RemoteAdapterFactory
manager
- local node type manager
RemoteException
- on RMI errorspublic RemoteItem getRemoteItem(Item item) throws 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 RemoteAdapterFactory
item
- local item
RemoteException
- on RMI errorspublic RemoteProperty getRemoteProperty(Property property) throws RemoteException
ServerProperty
instance.
Returns a remote adapter for the given local property.
getRemoteProperty
in interface RemoteAdapterFactory
property
- local property
RemoteException
- on RMI errorspublic RemoteNode getRemoteNode(Node node) throws RemoteException
ServerNode
instance.
Returns a remote adapter for the given local node.
getRemoteNode
in interface RemoteAdapterFactory
node
- local node
RemoteException
- on RMI errorspublic RemoteVersion getRemoteVersion(Version version) throws RemoteException
ServerVersion
instance.
Returns a remote adapter for the given local version.
getRemoteVersion
in interface RemoteAdapterFactory
version
- local version
RemoteException
- on RMI errorspublic RemoteVersionHistory getRemoteVersionHistory(VersionHistory versionHistory) throws RemoteException
ServerVersionHistory
instance.
Returns a remote adapter for the given local version history.
getRemoteVersionHistory
in interface RemoteAdapterFactory
versionHistory
- local version history
RemoteException
- on RMI errorspublic RemoteNodeType getRemoteNodeType(NodeType type) throws RemoteException
ServerNodeType
instance.
Returns a remote adapter for the given local node type.
getRemoteNodeType
in interface RemoteAdapterFactory
type
- local node type
RemoteException
- on RMI errorspublic RemoteItemDefinition getRemoteItemDefinition(ItemDefinition def) throws 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 RemoteAdapterFactory
def
- local item definition
RemoteException
- on RMI errorspublic RemoteNodeDefinition getRemoteNodeDefinition(NodeDefinition def) throws RemoteException
ServerNodeDefinition
instance.
Returns a remote adapter for the given local node definition.
getRemoteNodeDefinition
in interface RemoteAdapterFactory
def
- local node definition
RemoteException
- on RMI errorspublic RemotePropertyDefinition getRemotePropertyDefinition(PropertyDefinition def) throws RemoteException
ServerPropertyDefinition
instance.
Returns a remote adapter for the given local property definition.
getRemotePropertyDefinition
in interface RemoteAdapterFactory
def
- local property definition
RemoteException
- on RMI errorspublic RemoteLock getRemoteLock(Lock lock) throws RemoteException
ServerLock
instance.
Returns a remote adapter for the given local lock.
getRemoteLock
in interface RemoteAdapterFactory
lock
- local lock
RemoteException
- on RMI errorspublic RemoteQueryManager getRemoteQueryManager(Session session, QueryManager manager) throws RemoteException
ServerQueryManager
instance.
Returns a remote adapter for the given local query manager.
getRemoteQueryManager
in interface RemoteAdapterFactory
session
- current sessionmanager
- local query manager
RemoteException
- on RMI errorspublic RemoteQuery getRemoteQuery(Query query) throws RemoteException
ServerQuery
instance.
Returns a remote adapter for the given local query.
getRemoteQuery
in interface RemoteAdapterFactory
query
- local query
RemoteException
- on RMI errorspublic RemoteQueryResult getRemoteQueryResult(QueryResult result) throws RemoteException
ServerQueryResult
instance.
Returns a remote adapter for the given local query result.
getRemoteQueryResult
in interface RemoteAdapterFactory
result
- local query result
RemoteException
- on RMI errorspublic RemoteRow getRemoteRow(Row row) throws RemoteException
ServerQueryResult
instance.
Returns a remote adapter for the given local query row.
getRemoteRow
in interface RemoteAdapterFactory
row
- local query row
RemoteException
- on RMI errorspublic RemoteEventCollection getRemoteEvent(long listenerId, EventIterator events) throws RemoteException
ServerEventCollection
instances.
Returns a remote adapter for the given local events.
getRemoteEvent
in interface RemoteAdapterFactory
listenerId
- The listener identifier to which the events are to be
dispatched.events
- the local events
RemoteException
- on RMI errorsprotected RemoteIterator optimizeIterator(RemoteIterator remote) throws 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
RemoteException
- on RMI errorspublic RemoteIterator getRemoteNodeIterator(NodeIterator iterator) throws RemoteException
ServerNodeIterator
instance. Returns a remote adapter for the given local node iterator.
getRemoteNodeIterator
in interface RemoteAdapterFactory
iterator
- local node iterator
RemoteException
- on RMI errorspublic RemoteIterator getRemotePropertyIterator(PropertyIterator iterator) throws RemoteException
ServerPropertyIterator
instance. Returns a remote adapter for the given local property iterator.
getRemotePropertyIterator
in interface RemoteAdapterFactory
iterator
- local property iterator
RemoteException
- on RMI errorspublic RemoteIterator getRemoteVersionIterator(VersionIterator iterator) throws RemoteException
ServerVersionIterator
instance. Returns a remote adapter for the given local version iterator.
getRemoteVersionIterator
in interface RemoteAdapterFactory
iterator
- local version iterator
RemoteException
- on RMI errorspublic RemoteIterator getRemoteNodeTypeIterator(NodeTypeIterator iterator) throws RemoteException
ServerNodeTypeIterator
instance. Returns a remote adapter for the given local node type iterator.
getRemoteNodeTypeIterator
in interface RemoteAdapterFactory
iterator
- local node type iterator
RemoteException
- on RMI errorspublic RemoteIterator getRemoteRowIterator(RowIterator iterator) throws RemoteException
ServerRowIterator
instance. Returns a remote adapter for the given local row iterator.
getRemoteRowIterator
in interface RemoteAdapterFactory
iterator
- local row iterator
RemoteException
- on RMI errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |