@Override public void send(String message) { event.fire(message); } }
@Override public void send(String message) { event.fire(message); } }
@DELETE public void debit(@QueryParam("amount") long amount) { debitEvent.fire(amount); }
@POST public void credit(@QueryParam("amount") long amount) { creditEvent.fire(amount); }
private void fireEvent(Timer timer) { pingEvent.fire(new Ping(timer.getInfo().toString())); } }
@Override public void remoteDeviceAdded(Registry registry, RemoteDevice device) { remoteDeviceDiscoveryEvent.select(Phase.COMPLETE).fire( new RemoteDeviceDiscovery(device) ); }
@Override public void onDeviceViewChanged(DeviceView deviceView) { deviceSelectionChangedEvent.fire( new DeviceInfoSelectionChanged(deviceView.getDevice()) ); }
@Override public void remoteDeviceDiscoveryStarted(Registry registry, RemoteDevice device) { remoteDeviceDiscoveryEvent.select(Phase.ALIVE).fire( new RemoteDeviceDiscovery(device) ); }
@Override public void localDeviceAdded(Registry registry, LocalDevice device) { localDeviceDiscoveryEvent.select(Phase.COMPLETE).fire( new LocalDeviceDiscovery(device) ); }
@Override public void beforeShutdown(Registry registry) { registryShutdownEvent.select(new AnnotationLiteral<Before>() { }).fire( new RegistryShutdown() ); }
@Override public void afterShutdown() { registryShutdownEvent.select(new AnnotationLiteral<After>() { }).fire( new RegistryShutdown() ); } }
@Override public void onRefreshDevices() { registry.removeAllRemoteDevices(); searchEvent.fire(new Search(1)); }
@Schedules({ @Schedule(hour = "*", minute = "*", second = "*/5", info = "Every 5 second timer"), @Schedule(hour = "*", minute = "*", second = "*/10", info = "Every 10 second timer") }) public void automaticallyScheduled(Timer timer) { pingEvent.fire(new Ping(timer.getInfo().toString())); }
@Timeout public void programmaticTimout(Timer timer) { pingEvent.fire(new Ping(timer.getInfo().toString())); } }
@Override public void onDisableNetwork() { disableRouterEvent.fire(new DisableRouter()); try { view.onNetworkSwitch(router.isEnabled()); } catch (RouterException ex) { Workbench.Log.MAIN.warning("Can't get current router state: " + ex); } }
@Override public void init() { super.init(); upnpServiceStartEvent.fire(new UpnpService.Start()); rootPresenter.init(); }
public void actionPerformed(ActionEvent e) { centerWindowEvent.fire(new CenterWindow(logCategorySelector)); logCategorySelector.setVisible(!logCategorySelector.isVisible()); } });
@Schedule(hour = "*", minute = "*", second = "*/5", info = "Every 5 second timer") public void printDate() { Collection<Timer> timers = ctx.getTimerService().getAllTimers(); for (Timer t : timers) { pingEvent.fire(new Ping(t.getInfo().toString())); } }
@Override public void shutdown() { upnpServiceShutdownEvent.fire(new UpnpService.Shutdown()); removeLoggingHandler(); // Disable CDI logging handler before stopping CDI container weld.shutdown(); super.shutdown(); }
@Override public void onQueryStateVariable(StateVariable stateVar) { Action action = stateVar.getService().getQueryStateVariableAction(); actionInvocationRequestEvent.fire(new InvokeAction( action, new ActionArgumentValue( action.getInputArgument(QueryStateVariableAction.INPUT_ARG_VAR_NAME), stateVar.getName() // The literal variable name is the argument ) )); }