Package org.apache.karaf.cellar.core.event

Examples of org.apache.karaf.cellar.core.event.EventProducer


                    Object obj = method.invoke(targetService, event.getArguments().toArray());
                    RemoteServiceResult result = new RemoteServiceResult(event.getId());
                    result.setResult(obj);

                    EventProducer producer = eventTransportFactory.getEventProducer(Constants.RESULT_PREFIX + Constants.SEPARATOR + event.getSourceNode().getId() + event.getEndpointId(), false);
                    producer.produce(result);

                } catch (NoSuchMethodException e) {
                    LOGGER.error("CELLAR DOSGI: unable to find remote method for service", e);
                } catch (InvocationTargetException e) {
                    LOGGER.error("CELLAR DOSGI: unable to invoke remote method for service", e);
View Full Code Here


        state.setLocation(location);
        state.setStatus(BundleEvent.INSTALLED);
        bundles.put(name + "/" + version, state);
       
        // broadcast the event
        EventProducer producer = eventTransportFactory.getEventProducer(groupName, true);
        RemoteBundleEvent event = new RemoteBundleEvent(name, version, location, BundleEvent.INSTALLED);
        event.setForce(true);
        event.setSourceGroup(group);
        producer.produce(event);

        return null;
    }
View Full Code Here

        } finally {
            Thread.currentThread().setContextClassLoader(originalClassLoader);
        }

        // broadcast the event
        EventProducer producer = eventTransportFactory.getEventProducer(groupName, true);
        RemoteBundleEvent event = new RemoteBundleEvent(name, version, null, BundleEvent.STOPPED);
        event.setForce(true);
        event.setSourceGroup(group);
        producer.produce(event);

        return null;
    }
View Full Code Here

        } finally {
            Thread.currentThread().setContextClassLoader(originalClassLoader);
        }

        // broadcast the event
        EventProducer producer = eventTransportFactory.getEventProducer(groupName, true);
        RemoteBundleEvent event = new RemoteBundleEvent(name, version, null, BundleEvent.STARTED);
        event.setForce(true);
        event.setSourceGroup(group);
        producer.produce(event);

        return null;
    }
View Full Code Here

        Properties serviceProperties = new Properties();
        serviceProperties.put("type", "group");
        serviceProperties.put("name", groupName);

        if (!producerRegistrations.containsKey(groupName)) {
            EventProducer producer = groupProducers.get(groupName);
            if(producer == null) {
                producer = eventTransportFactory.getEventProducer(groupName,Boolean.TRUE);
                groupProducers.put(groupName,producer);
            }
View Full Code Here

        state.setLocation(location);
        state.setStatus(BundleEvent.INSTALLED);
        bundles.put(name + "/" + version, state);

        // broadcast the event
        EventProducer producer = eventTransportFactory.getEventProducer(groupName, true);
        RemoteBundleEvent event = new RemoteBundleEvent(name, version, location, BundleEvent.INSTALLED);
        event.setForce(true);
        event.setSourceGroup(group);
        producer.produce(event);
    }
View Full Code Here

        } finally {
            Thread.currentThread().setContextClassLoader(originalClassLoader);
        }

        // broadcast the event
        EventProducer producer = eventTransportFactory.getEventProducer(groupName, true);
        RemoteBundleEvent event = new RemoteBundleEvent(symbolicName, version, null, BundleEvent.UNINSTALLED);
        event.setForce(true);
        event.setSourceGroup(group);
        producer.produce(event);
    }
View Full Code Here

        } finally {
            Thread.currentThread().setContextClassLoader(originalClassLoader);
        }

        // broadcast the event
        EventProducer producer = eventTransportFactory.getEventProducer(groupName, true);
        RemoteBundleEvent event = new RemoteBundleEvent(symbolicName, version, null, BundleEvent.STARTED);
        event.setForce(true);
        event.setSourceGroup(group);
        producer.produce(event);
    }
View Full Code Here

        } finally {
            Thread.currentThread().setContextClassLoader(originalClassLoader);
        }

        // broadcast the event
        EventProducer producer = eventTransportFactory.getEventProducer(groupName, true);
        RemoteBundleEvent event = new RemoteBundleEvent(symbolicName, version, null, BundleEvent.STOPPED);
        event.setForce(true);
        event.setSourceGroup(group);
        producer.produce(event);
    }
View Full Code Here

        this.eventTransportFactory = eventTransportFactory;
    }

    public void install(String groupName, String name, String version) throws Exception {
        Group group = groupManager.findGroupByName(groupName);
        EventProducer producer = eventTransportFactory.getEventProducer(groupName,true);
        RemoteFeaturesEvent event = new RemoteFeaturesEvent(name, version, FeatureEvent.EventType.FeatureInstalled);
        event.setForce(true);
        event.setSourceGroup(group);
        producer.produce(event);
    }
View Full Code Here

TOP

Related Classes of org.apache.karaf.cellar.core.event.EventProducer

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.