@Override public void roomStop(IScope scope) { log.debug(APP + ":roomStop " + scope.getName()); layoutApplication.destroyRoom(scope.getName()); if (!hasSharedObject(scope, LAYOUT_SO)) { clearSharedObjects(scope, LAYOUT_SO); } }
@Override public boolean roomStart(IScope scope) { log.debug(APP + ":roomStart " + scope.getName()); layoutApplication.createRoom(scope.getName()); if (!hasSharedObject(scope, LAYOUT_SO)) { if (createSharedObject(scope, LAYOUT_SO, false)) { return true; } } log.error("Failed to start room " + scope.getName()); return false; }
@Override public boolean roomConnect(IConnection connection, Object[] params) { log.debug(APP + ":roomConnect"); ISharedObject so = getSharedObject(connection.getScope(), LAYOUT_SO); log.debug("Setting up Listener"); LayoutSender sender = new LayoutSender(so); String room = connection.getScope().getName(); log.debug("Adding event listener to " + room); log.debug("Adding room listener"); layoutApplication.addRoomListener(room, sender); log.debug("Done setting up listener"); return true; }
public void setLayoutApplication(LayoutApplication a) { log.debug("Setting layout application"); layoutApplication = a; layoutApplication.handler = this; }