@Test public void testRegisteringAnEventProducerAndFiringAnEventWithLeaseBeingDropped() throws Exception { BasicEventConsumer consumer = new BasicEventConsumer(getEventDescriptor()); Listener listener = new Listener(); consumer.register(listener); Producer p = new Producer(); p.setLeaseTime(3 * 1000); p.createDEH(); ServiceItem serviceItem = createServiceItem(p); EventRegistration eventRegistration = consumer.register(serviceItem); Assert.assertNotNull(eventRegistration); System.err.println("Waiting 5 seconds for lease to timeout..."); int i = 1; while (i < 50) { Thread.sleep(100); i++; } p.fire(); assertEquals("Should have not been notified, but got: " + listener.counter.get(), 0, listener.counter.get()); }
public boolean register(final RemoteServiceEventListener listener) { return (register(listener, null)); }
BasicEventConsumer implements EventConsumer, ServerProxyTrust { public boolean register(final RemoteServiceEventListener listener) { return (register(listener, null)); } }
BasicEventConsumer implements EventConsumer, ServerProxyTrust { public boolean register(final RemoteServiceEventListener listener) { return (register(listener, null)); } BasicEventConsumer(final EventDescriptor edTemplate);  BasicEventConsumer(final RemoteServiceEventListener<?> listener);  BasicEventConsumer(final EventDescriptor edTemplate, final RemoteServiceEventListener<?> listener);  BasicEventConsumer(final EventDescriptor edTemplate,
                              final RemoteServiceEventListener<?> listener,
                              final Configuration config);  BasicEventConsumer(final EventDescriptor edTemplate,
                              final RemoteServiceEventListener<?> listener,
                              final MarshalledObject<?> handback,
                              final Configuration config); }
BasicEventConsumer implements EventConsumer, ServerProxyTrust { public boolean register(final RemoteServiceEventListener listener) { return (register(listener, null)); } BasicEventConsumer(final EventDescriptor edTemplate);  BasicEventConsumer(final RemoteServiceEventListener<?> listener);  BasicEventConsumer(final EventDescriptor edTemplate, final RemoteServiceEventListener<?> listener);  BasicEventConsumer(final EventDescriptor edTemplate,
                              final RemoteServiceEventListener<?> listener,
                              final Configuration config);  BasicEventConsumer(final EventDescriptor edTemplate,
                              final RemoteServiceEventListener<?> listener,
                              final MarshalledObject<?> handback,
                              final Configuration config); void terminate(); boolean register(final RemoteServiceEventListener listener); boolean register(final RemoteServiceEventListener listener, final MarshalledObject handback); boolean deregister(final RemoteServiceEventListener listener); Watch createWatch(final WatchDataSourceRegistry watchRegistry); void destroyWatch(); Watch getWatch(); EventRegistration register(final ServiceItem item); EventRegistration register(final EventProducer eventProducer,
                                      final EventDescriptor eventDesc,
                                      final ServiceID serviceID); Object getEventRegistrationSource(final long eventID); void deregister(final ServiceID serviceID); void deregister(final ServiceID serviceID, final boolean disconnect); void notify(final RemoteEvent rEvent); TrustVerifier getProxyVerifier(); }
BasicEventConsumer implements EventConsumer, ServerProxyTrust { public boolean register(final RemoteServiceEventListener listener) { return (register(listener, null)); } BasicEventConsumer(final EventDescriptor edTemplate);  BasicEventConsumer(final RemoteServiceEventListener<?> listener);  BasicEventConsumer(final EventDescriptor edTemplate, final RemoteServiceEventListener<?> listener);  BasicEventConsumer(final EventDescriptor edTemplate,
                              final RemoteServiceEventListener<?> listener,
                              final Configuration config);  BasicEventConsumer(final EventDescriptor edTemplate,
                              final RemoteServiceEventListener<?> listener,
                              final MarshalledObject<?> handback,
                              final Configuration config); void terminate(); boolean register(final RemoteServiceEventListener listener); boolean register(final RemoteServiceEventListener listener, final MarshalledObject handback); boolean deregister(final RemoteServiceEventListener listener); Watch createWatch(final WatchDataSourceRegistry watchRegistry); void destroyWatch(); Watch getWatch(); EventRegistration register(final ServiceItem item); EventRegistration register(final EventProducer eventProducer,
                                      final EventDescriptor eventDesc,
                                      final ServiceID serviceID); Object getEventRegistrationSource(final long eventID); void deregister(final ServiceID serviceID); void deregister(final ServiceID serviceID, final boolean disconnect); void notify(final RemoteEvent rEvent); TrustVerifier getProxyVerifier(); static final String RESPONSE_WATCH; }