public class ServerAdapterFactory extends Object implements RemoteAdapterFactory
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 and Description |
---|
ServerAdapterFactory() |
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 repositoryRemoteException
- 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 sessionRemoteException
- 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 workspaceRemoteException
- 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 managerRemoteException
- 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 registryRemoteException
- 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 managerRemoteException
- 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 itemRemoteException
- 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 propertyRemoteException
- 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 nodeRemoteException
- 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 versionRemoteException
- 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 historyRemoteException
- 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 typeRemoteException
- 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 definitionRemoteException
- 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 definitionRemoteException
- 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 definitionRemoteException
- 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 lockRemoteException
- 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 managerRemoteException
- 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 queryRemoteException
- 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 resultRemoteException
- 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 rowRemoteException
- 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 eventsRemoteException
- 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 iteratorRemoteException
- 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 iteratorRemoteException
- 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 iteratorRemoteException
- 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 iteratorRemoteException
- 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 iteratorRemoteException
- 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 iteratorRemoteException
- on RMI errorspublic RemoteLockManager getRemoteLockManager(LockManager lockManager) throws RemoteException
getRemoteLockManager
in interface RemoteAdapterFactory
RemoteException
public RemoteVersionManager getRemoteVersionManager(Session session, VersionManager versionManager) throws RemoteException
getRemoteVersionManager
in interface RemoteAdapterFactory
RemoteException
public RemoteAccessControlManager getRemoteAccessControlManager(AccessControlManager acm) throws RemoteException
ServerAccessControlManager
instance. Returns a remote adapter for the given local access control manager.getRemoteAccessControlManager
in interface RemoteAdapterFactory
acm
- local access control managerRemoteException
- on RMI errorspublic RemotePrivilege getRemotePrivilege(Privilege local) throws RemoteException
RemoteAdapterFactory
getRemotePrivilege
in interface RemoteAdapterFactory
RemoteException
- on RMI errorspublic RemotePrivilege[] getRemotePrivilege(Privilege[] local) throws RemoteException
RemoteAdapterFactory
getRemotePrivilege
in interface RemoteAdapterFactory
RemoteException
- on RMI errorspublic RemoteAccessControlPolicy getRemoteAccessControlPolicy(AccessControlPolicy local) throws RemoteException
RemoteAdapterFactory
getRemoteAccessControlPolicy
in interface RemoteAdapterFactory
RemoteException
- on RMI errorspublic RemoteAccessControlPolicy[] getRemoteAccessControlPolicy(AccessControlPolicy[] local) throws RemoteException
RemoteAdapterFactory
getRemoteAccessControlPolicy
in interface RemoteAdapterFactory
RemoteException
- on RMI errorspublic RemoteIterator getRemoteAccessControlPolicyIterator(AccessControlPolicyIterator iterator) throws RemoteException
ServerNodeIterator
instance. Returns a remote adapter for the given local access control manager.getRemoteAccessControlPolicyIterator
in interface RemoteAdapterFactory
RemoteException
- on RMI errorspublic RemoteAccessControlEntry getRemoteAccessControlEntry(AccessControlEntry local) throws RemoteException
RemoteAdapterFactory
getRemoteAccessControlEntry
in interface RemoteAdapterFactory
RemoteException
- on RMI errorspublic RemoteAccessControlEntry[] getRemoteAccessControlEntry(AccessControlEntry[] local) throws RemoteException
RemoteAdapterFactory
getRemoteAccessControlEntry
in interface RemoteAdapterFactory
RemoteException
- on RMI errorspublic RemotePrincipal getRemotePrincipal(Principal principal) throws RemoteException
RemoteAdapterFactory
getRemotePrincipal
in interface RemoteAdapterFactory
RemoteException
- on RMI errorspublic RemoteIterator getRemotePrincipalIterator(Iterator<Principal> principals) throws RemoteException
RemoteAdapterFactory
getRemotePrincipalIterator
in interface RemoteAdapterFactory
RemoteException
- on RMI errorsCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.