public void initialize(final EventCollectorContext context) throws Exception {
if(context==null)
throw new IllegalArgumentException("context must not be null");
this.eventQ = context.getEventQueue();
ServiceDiscoveryManager sdm = new ServiceDiscoveryManager(context.getDiscoveryManager(),
new LeaseRenewalManager(context.getConfiguration()),
context.getConfiguration());
for(EventDescriptor eventDescriptor : context.getEventDescriptors()) {
ServiceTemplate template = new ServiceTemplate(null, null, new Entry[]{eventDescriptor});
LookupCache lCache = sdm.createLookupCache(template, null, null);
EventProducerManager eventProducerManager = new EventProducerManager(eventDescriptor, this, lCache);
lCache.addListener(eventProducerManager);
eventProducerManagers.add(eventProducerManager);
}