public class ServerObservationManager extends ServerObject implements RemoteObservationManager
ObservationManager interface.
 This class makes a local item available as an RMI service using
 the RemoteObservationManager
 interface.
 
 This class works in conjunction with the
 ClientObservationManager class to
 implement the distributed the event listener registration described in
 observation package
 comment.
ObservationManager, 
RemoteObservationManager, 
Serialized Formref| Constructor and Description | 
|---|
ServerObservationManager(javax.jcr.observation.ObservationManager observationManager,
                        RemoteAdapterFactory factory)
Creates a remote adapter for the given local workspace. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addEventListener(long listenerId,
                int eventTypes,
                String absPath,
                boolean isDeep,
                String[] uuid,
                String[] nodeTypeName,
                boolean noLocal)
Remote version of the
  
ObservationManager.addEventListener()
 method. | 
RemoteEventCollection | 
getNextEvent(long timeout)
Returns the next event to be dispatched to registered event listeners. 
 | 
void | 
removeEventListener(long listenerId)
Remote version of the
  
ObservationManager.removeEventListener()
 method. | 
getFactory, getRemoteItem, getRemoteNode, getRemoteNodeTypeArray, getRepositoryException, getSerialValue, getSerialValuesclone, exportObject, exportObject, exportObject, unexportObjectgetClientHost, getLog, setLogpublic ServerObservationManager(javax.jcr.observation.ObservationManager observationManager,
                        RemoteAdapterFactory factory)
                         throws RemoteException
observationManager - local observation managerfactory - remote adapter factoryRemoteException - on RMI errorspublic void addEventListener(long listenerId,
                    int eventTypes,
                    String absPath,
                    boolean isDeep,
                    String[] uuid,
                    String[] nodeTypeName,
                    boolean noLocal)
                      throws javax.jcr.RepositoryException,
                             RemoteException
ObservationManager.addEventListener()
 method. See class comment for an explanation on how the
 listenerId is used.addEventListener in interface RemoteObservationManagerlistenerId - 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 - true if the events from the complete subtree
      rooted at absPath are 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. If null this parameter is ignored.nodeTypeName - An optional list of node type names for which events
      are to be sent. If null this parameter is ignored.noLocal - true if only events are to be sent which do
      not originate from the session to which this instance belongs.javax.jcr.RepositoryException - on repository errorsRemoteException - on RMI errorspublic void removeEventListener(long listenerId)
                         throws javax.jcr.RepositoryException,
                                RemoteException
ObservationManager.removeEventListener()
 method. See class comment for an explanation on how the
 listenerId is used.removeEventListener in interface RemoteObservationManagerlistenerId - The identification of the listener on the client
      side to which events will be directed.javax.jcr.RepositoryException - on repository errorsRemoteException - on RMI errorspublic RemoteEventCollection getNextEvent(long timeout) throws RemoteException
getNextEvent in interface RemoteObservationManagertimeout - The time in milliseconds to wait for the next event
      available to be dispatched. If negative or zero, this method waits
      for ever.RemoteEventCollection to be dispatched. null is
      returned if the method timed out waiting for an event to be
      dispatched.RemoteException - on RMI errorsCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.