Package org.apache.jackrabbit.spi

Defines the interfaces of the JCR SPI (Service Provider Interface).

See: Description

Package org.apache.jackrabbit.spi Description

Defines the interfaces of the JCR SPI (Service Provider Interface).

The SPI cuts the JCR stack into two parts:

Observation

Because one of the goals of this SPI is to make it easier to implement a remoting layer using various existing protocols, the observation mechanism has been design with this goal in mind. Instead of a listener registration with a callback for each event bundle, the SPI uses a polling mechanism with a timeout: RepositoryService.getEvents(). With every call to this method the repository is advised to return the events that occurred since the last call. As a reference to the last retrieved EventBundle the SessionInfo contains a bundle identifier which is automatically updated on each call to RepositoryService.getEvents(). While this design allows for a polling implementation on top of the SPI it is also well suited for a listener based observation implementation on top of the SPI. With only little thread synchronization overhead events can be acquired using a timeout of Long.MAX_VALUE.

If an SPI implementation does not support observation, the method RepositoryService.getEvents() will always throw an UnsupportedRepositoryOperationException.

Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.