Examples of removeObserver()


Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

    protected void onDetach()
    {
        super.onDetach();
        final EventBus eventBus = EventBus.getInstance();
        eventBus.removeObserver(UpdatedNotificationFilterPreferencesResponseEvent.class, settingsSavedObserver);
        eventBus.removeObserver(GotNotificationFilterPreferencesResponseEvent.class, gotDataObserver);
    }

    /**
     * Gathers settings and sends to model to send to server.
     *
 
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

                {
                    public void update(final UpdatedReviewPendingGroupResponseEvent ev)
                    {
                        if (ev.getResponse().getGroupShortName().equals(group.getShortName()))
                        {
                            eventBus.removeObserver(ev, this);
                            String msg =
                                    ev.getResponse().getApproved() ? "The " + group.getName()
                                            + " group has been approved" : "The request to create the "
                                            + group.getName() + " group has been denied";
                            eventBus.notifyObservers(new ShowNotificationEvent(new Notification(msg)));
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

        eventBus.addObserver(GotNotificationListResponseEvent.class, new Observer<GotNotificationListResponseEvent>()
        {
            public void update(final GotNotificationListResponseEvent ev)
            {
                eventBus.removeObserver(ev, this);
                storeReceivedNotifications(ev.getResponse());
                selectSource(currentSource);
            }
        });
        eventBus.addObserver(NotificationClickedEvent.class, notificationClickedObserver);
View Full Code Here

Examples of org.eurekastreams.web.client.events.EventBus.removeObserver()

            public void update(final UpdatedHistoryParametersEvent event)
            {
                checkHistory(event.getParameters());

                // Only process this once.
                eventBus.removeObserver(UpdatedHistoryParametersEvent.class, this);
            }
        }, true);

        eventBus.addObserver(UpdatedHistoryParametersEvent.class, new Observer<UpdatedHistoryParametersEvent>()
        {
View Full Code Here

Examples of org.milyn.javabean.context.BeanContext.removeObserver()

      ExecutionContext executionContext = event.getExecutionContext();
      populator.populateAndSetPropertyValue(bean, executionContext.getBeanContext(), watchingBeanId, executionContext, event.getSource());
    } else if(beanId == watchingBeanId && lifecycle == BeanLifecycle.REMOVE) {
      BeanContext beanContext = event.getExecutionContext().getBeanContext();
     
      beanContext.removeObserver(this);
      // Need to remove the watched bean from the bean context too because it's lifecycle is associated
      // with the lifecycle of the watching bean, which has been removed...
      if(watchedBeanId != null) {
        beanContext.removeBean(watchedBeanId, event.getSource());
      }
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSNotificationCenter.removeObserver()

        NSNotification notification = NSNotification.CLASS.notificationWithName_object("MyNotification", null);
       
        assertNull(implementor.arg);
        notificationCentre.postNotification(notification);            
        assertEquals(notification, implementor.arg);
        notificationCentre.removeObserver(observer);
    }
   
    @Test public void testMemoryManagement() {
        // we were autorelease'ing the proxy - so that this failed
        NSNotificationCenter notificationCentre = NSNotificationCenter.CLASS.defaultCenter();
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSNotificationCenter.removeObserver()

        pool.drain();
        pool = NSAutoreleasePool.new_();

        NSNotification notification = NSNotification.CLASS.notificationWithName_object("MyNotification", null);       
        notificationCentre.postNotification(notification);
        notificationCentre.removeObserver(observer);
    }
   
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.