Package org.apache.jackrabbit.rmi.server
Class ServerObservationManager
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- org.apache.jackrabbit.rmi.server.ServerObject
-
- org.apache.jackrabbit.rmi.server.ServerObservationManager
-
- All Implemented Interfaces:
Serializable,Remote,RemoteObservationManager
@Deprecated public class ServerObservationManager extends ServerObject implements RemoteObservationManager
Deprecated.RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.Remote adapter for the JCR
ObservationManagerinterface. This class makes a local item available as an RMI service using theRemoteObservationManagerinterface.This class works in conjunction with the
ClientObservationManagerclass to implement the distributed the event listener registration described inobservationpackage comment.
-
-
Field Summary
-
Fields inherited from class java.rmi.server.RemoteObject
ref
-
-
Constructor Summary
Constructors Constructor Description ServerObservationManager(ObservationManager observationManager, RemoteAdapterFactory factory)Deprecated.Creates a remote adapter for the given local workspace.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddEventListener(long listenerId, int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal)Deprecated.Remote version of theObservationManager.addEventListener()method.RemoteEventCollectiongetNextEvent(long timeout)Deprecated.Returns the next event to be dispatched to registered event listeners.voidremoveEventListener(long listenerId)Deprecated.Remote version of theObservationManager.removeEventListener()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
-
-
-
-
Constructor Detail
-
ServerObservationManager
public ServerObservationManager(ObservationManager observationManager, RemoteAdapterFactory factory) throws RemoteException
Deprecated.Creates a remote adapter for the given local workspace.- Parameters:
observationManager- local observation managerfactory- remote adapter factory- Throws:
RemoteException- on RMI errors
-
-
Method Detail
-
addEventListener
public void addEventListener(long listenerId, int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal) throws RepositoryException, RemoteExceptionDeprecated.Remote version of theObservationManager.addEventListener()method. See class comment for an explanation on how thelistenerIdis used.- Specified by:
addEventListenerin interfaceRemoteObservationManager- Parameters:
listenerId- The identification of the listener on the client side to which events will be directed.eventTypes- The mask of event types to be sent to this listener.absPath- The root item defining a subtree for which events are to be delivered.isDeep-trueif the events from the complete subtree rooted atabsPathare to be sent or only for the item at the given path.uuid- An optional list of node UUIDs for which events are to be sent. Ifnullthis parameter is ignored.nodeTypeName- An optional list of node type names for which events are to be sent. Ifnullthis parameter is ignored.noLocal-trueif only events are to be sent which do not originate from the session to which this instance belongs.- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
removeEventListener
public void removeEventListener(long listenerId) throws RepositoryException, RemoteExceptionDeprecated.Remote version of theObservationManager.removeEventListener()method. See class comment for an explanation on how thelistenerIdis used.- Specified by:
removeEventListenerin interfaceRemoteObservationManager- Parameters:
listenerId- The identification of the listener on the client side to which events will be directed.- Throws:
RepositoryException- on repository errorsRemoteException- on RMI errors
-
getNextEvent
public RemoteEventCollection getNextEvent(long timeout) throws RemoteException
Deprecated.Returns the next event to be dispatched to registered event listeners. If no event is available, this method blocks until one is available or until the given timeout expires.- Specified by:
getNextEventin interfaceRemoteObservationManager- Parameters:
timeout- The time in milliseconds to wait for the next event available to be dispatched. If negative or zero, this method waits for ever.- Returns:
- The
RemoteEventCollectionto be dispatched.nullis returned if the method timed out waiting for an event to be dispatched. - Throws:
RemoteException- on RMI errors
-
-