1 package at.ac.tuwien.sbc.valesriegler.xvsm.spacehelpers;
3 import java.io.Serializable;
6 import org.mozartspaces.capi3.FifoCoordinator;
7 import org.mozartspaces.core.Capi;
8 import org.mozartspaces.core.ContainerReference;
9 import org.mozartspaces.core.MzsConstants;
10 import org.mozartspaces.core.MzsConstants.RequestTimeout;
11 import org.mozartspaces.notifications.NotificationManager;
15 * @author Gregor Riegler <gregor DOT riegler AT gmail DOT com>
19 public class SpaceListenerImpl extends SpaceListener {
21 public final NotificationManager notificationManager;
23 private ContainerReference cref;
26 public SpaceListenerImpl(Capi capi, ContainerReference cref, int timeout, SpaceAction spaceAction, NotificationManager notificationManager, boolean lookaround) {
29 this.timeout = timeout;
30 this.spaceAction = spaceAction;
31 this.notificationManager = notificationManager;
32 this.lookAround = lookaround;
36 List<? extends Serializable> getEntries() throws Exception {
37 return capi.read(cref, FifoCoordinator
38 .newSelector(MzsConstants.Selecting.COUNT_MAX),
39 RequestTimeout.DEFAULT, null);