Package org.apache.jackrabbit.rmi.server
Class ServerObject
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- org.apache.jackrabbit.rmi.server.ServerObject
-
- All Implemented Interfaces:
Serializable
,Remote
- Direct Known Subclasses:
ServerAccessControlEntry
,ServerAccessControlManager
,ServerAccessControlPolicy
,ServerEventCollection
,ServerEventCollection.ServerEvent
,ServerItem
,ServerItemDefinition
,ServerIterator
,ServerLock
,ServerLockManager
,ServerNamespaceRegistry
,ServerNodeType
,ServerNodeTypeManager
,ServerObservationManager
,ServerPrincipal
,ServerPrivilege
,ServerQuery
,ServerQueryManager
,ServerQueryResult
,ServerRepository
,ServerRow
,ServerSession
,ServerVersionManager
,ServerWorkspace
@Deprecated(forRemoval=true) public class ServerObject extends UnicastRemoteObject
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.Base class for remote adapters. The purpose of this class is to centralize the handling of the RemoteAdapterFactory instance used to instantiate new server adapters.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.rmi.server.RemoteObject
ref
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ServerObject(RemoteAdapterFactory factory)
Deprecated, for removal: This API element is subject to removal in a future version.Creates a basic server adapter that uses the given factory to create new adapters.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected RemoteAdapterFactory
getFactory()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the remote adapter factory used to create new adapters.protected RemoteItem
getRemoteItem(Item item)
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for creating a remote reference for a local item.protected RemoteNode
getRemoteNode(Node node)
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for creating a remote reference for a local node.protected RemoteNodeType[]
getRemoteNodeTypeArray(NodeType[] types)
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for creating an array of remote references for local node types.protected RepositoryException
getRepositoryException(RepositoryException ex)
Deprecated, for removal: This API element is subject to removal in a future version.Returns a cleaned version of the given exception.protected Value
getSerialValue(Value value)
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for decorating a value.protected Value[]
getSerialValues(Value[] values)
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for preparing an array of values for serialization.-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
-
-
-
Constructor Detail
-
ServerObject
protected ServerObject(RemoteAdapterFactory factory) throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Creates a basic server adapter that uses the given factory to create new adapters.- Parameters:
factory
- remote adapter factory- Throws:
RemoteException
- on RMI errors
-
-
Method Detail
-
getFactory
protected RemoteAdapterFactory getFactory()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the remote adapter factory used to create new adapters.- Returns:
- remote adapter factory
-
getRepositoryException
protected RepositoryException getRepositoryException(RepositoryException ex)
Deprecated, for removal: This API element is subject to removal in a future version.Returns a cleaned version of the given exception. In some cases the underlying repository implementation may throw exceptions that are either unserializable, use exception subclasses that are only locally available, contain references to unserializable or only locally available classes. This method returns a cleaned version of such an exception. The returned exception contains only the message string from the original exception, and uses the public JCR exception class that most specifically matches the original exception.- Parameters:
ex
- the original exception- Returns:
- clean exception
-
getRemoteItem
protected RemoteItem getRemoteItem(Item item) throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for creating a remote reference for a local item. Unlike the factory method for creating remote item references, this method introspects the type of the local item and returns the corresponding node, property, or item remote reference using the remote adapter factory.If the
item
, this method calls thegetRemoteNode(Node)
to return the correct remote type.- Parameters:
item
- local node, property, or item- Returns:
- remote node, property, or item reference
- Throws:
RemoteException
- on RMI errors
-
getRemoteNode
protected RemoteNode getRemoteNode(Node node) throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for creating a remote reference for a local node. Unlike the factory method for creating remote node references, this method introspects the type of the local node and returns the corresponding node, version, or version history remote reference using the remote adapter factory.- Parameters:
node
- local version, versionhistory, or normal node- Returns:
- remote node, property, or item reference
- Throws:
RemoteException
- on RMI errors
-
getRemoteNodeTypeArray
protected RemoteNodeType[] getRemoteNodeTypeArray(NodeType[] types) throws RemoteException
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for creating an array of remote references for local node types. The remote references are created using the remote adapter factory.A
null
input is treated as an empty array.- Parameters:
types
- local node type array- Returns:
- remote node type array
- Throws:
RemoteException
- on RMI errors
-
getSerialValues
protected Value[] getSerialValues(Value[] values) throws RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for preparing an array of values for serialization. The returned array will contain serializable versions of all the given values.If the given array is
null
, then an empty array is returned.- Parameters:
values
- the values to be decorated- Returns:
- array of decorated values
- Throws:
RepositoryException
- if the values can not be serialized
-
getSerialValue
protected Value getSerialValue(Value value) throws RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for decorating a value. Note that the contents of the original values will only be copied when the decorators are serialized. Null referenced and already serializable values are passed as-is.- Parameters:
value
- the value to be decorated, ornull
- Returns:
- the decorated value, or
null
- Throws:
RepositoryException
- if the value can not be serialized
-
-