Package it.freedomotic.events

Examples of it.freedomotic.events.PluginHasChanged


            String startupTime = plugin.getConfiguration().getStringProperty("startup-time", "undefined");

            if (startupTime.equalsIgnoreCase("on load")) {
                plugin.start();

                PluginHasChanged event = new PluginHasChanged(this,
                        plugin.getName(),
                        PluginActions.DESCRIPTION);
                busService.send(event);

                double snapshot = (((runtime.totalMemory() - runtime.freeMemory()) / MB) - memory);
View Full Code Here


    @Override
    public final void setDescription(String description) {
        if (!getDescription().equalsIgnoreCase(description)) {
            this.description = description;

            PluginHasChanged event = new PluginHasChanged(this,
                    this.getName(),
                    PluginActions.DESCRIPTION);
            busService.send(event);
        }
    }
View Full Code Here

                @Override
                public void run() {
                    onStart();
                    isRunning = true;
                    LOG.info("Actuator " + getName() + " started.");
                    PluginHasChanged change = new PluginHasChanged(this, getName(), PluginActions.START);
                    busService.send(change);
                }
            };
            getApi().getAuth().pluginExecutePrivileged(this, action);
        }
View Full Code Here

                @Override
                public void run() {
                    isRunning = false;
                    onStop();
                    LOG.info("Actuator " + getName() + " stopped.");
                    PluginHasChanged change = new PluginHasChanged(this, getName(), PluginActions.STOP);
                    busService.send(change);
                }
            };
            getApi().getAuth().pluginExecutePrivileged(this, action);
        }
View Full Code Here

                clients.add(client);
                LOG.log(Level.WARNING, "Plugin {0} is not compatible with this framework version v{1}",
                        new Object[]{c.getName(), Info.getVersion()});
            }

            PluginHasChanged event =
                    new PluginHasChanged(ClientStorageInMemory.class,
                    c.getName(), PluginActions.ENQUEUE);
            final BusService busService = Freedomotic.INJECTOR.getInstance(BusService.class);
            busService.send(event);
            LOG.log(Level.CONFIG,
                    "{0} added to plugins list.",
View Full Code Here

    @Override
    public void remove(Client c) {
        if (clients.contains(c)) {
            clients.remove(c);

            PluginHasChanged event =
                    new PluginHasChanged(ClientStorageInMemory.class,
                    c.getName(), PluginActions.DEQUEUE);
            final BusService busService = Freedomotic.INJECTOR.getInstance(BusService.class);
            busService.send(event);
        }
    }
View Full Code Here

                @Override
                public synchronized void run() {
                    onStart();
                    sensorThread = new Protocol.SensorThread();
                    sensorThread.start();
                    PluginHasChanged event = new PluginHasChanged(this, getName(), PluginHasChanged.PluginActions.START);
                    busService.send(event);
                    isRunning = true;
                }
            };
View Full Code Here

                public synchronized void run() {
                    isRunning = false;
                    onStop();
                    sensorThread = null;
                    notify();
                    PluginHasChanged event = new PluginHasChanged(this, getName(), PluginHasChanged.PluginActions.STOP);
                    busService.send(event);
                }
            };
            getApi().getAuth().pluginExecutePrivileged(this, action);
        }
View Full Code Here

TOP

Related Classes of it.freedomotic.events.PluginHasChanged

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.