Search in sources :

Example 1 with Event

use of aQute.remote.api.Event in project bnd by bndtools.

the class AgentServer method frameworkEvent.

@Override
public void frameworkEvent(FrameworkEvent event) {
    try {
        Event e = new Event();
        e.type = Type.framework;
        e.code = event.getType();
        remote.event(e);
    } catch (Exception e1) {
        printStack(e1);
    }
}
Also used : FrameworkEvent(org.osgi.framework.FrameworkEvent) Event(aQute.remote.api.Event) BundleException(org.osgi.framework.BundleException) IOException(java.io.IOException)

Example 2 with Event

use of aQute.remote.api.Event in project bnd by bndtools.

the class AgentServer method sendEvent.

private void sendEvent(int code) {
    Event e = new Event();
    e.type = Event.Type.exit;
    e.code = code;
    try {
        remote.event(e);
    } catch (Exception e1) {
        printStack(e1);
    }
}
Also used : FrameworkEvent(org.osgi.framework.FrameworkEvent) Event(aQute.remote.api.Event) BundleException(org.osgi.framework.BundleException) IOException(java.io.IOException)

Aggregations

Event (aQute.remote.api.Event)2 IOException (java.io.IOException)2 BundleException (org.osgi.framework.BundleException)2 FrameworkEvent (org.osgi.framework.FrameworkEvent)2