Package com.google.gwt.event.shared

Examples of com.google.gwt.event.shared.EventBus


    @Override
    public void gwtSetUp() {
        /*
         * configure RESTY to use cache, usually done in gin
         */
        final EventBus eventBus = new SimpleEventBus();
        final QueueableCacheStorage cache = new VolatileQueueableCacheStorage();
       
        final CallbackFilter cachingCallbackFilter = new CachingCallbackFilter(cache);
        final CallbackFactory callbackFactory = new RetryingCallbackFactory(cachingCallbackFilter,
                new ModelChangeCallbackFilter(eventBus));
View Full Code Here


     * everything is okay...
     *
     */
    public void testIfCachingWorks() {
        //configure RESTY to use cache:
        final EventBus eventBus = new SimpleEventBus();
        QueueableCacheStorage cache = new VolatileQueueableCacheStorage();
        CallbackFilter cachingCallbackFilter = new CachingCallbackFilter(cache);
        CallbackFactory callbackFactory = new DefaultCallbackFactory(cachingCallbackFilter,
                    new ModelChangeCallbackFilter(eventBus));
        DispatcherFilter cachingDispatcherFilter = new CachingDispatcherFilter(cache, callbackFactory);
View Full Code Here

    public void testDefaultFunction() {
        /*
         * configure RESTY to use cache, usually done in gin
         */
        final EventBus eventBus = new SimpleEventBus();
        final QueueableCacheStorage cacheStorage = new VolatileQueueableCacheStorage();
        final FilterawareDispatcher dispatcher = new DefaultFilterawareDispatcher();

        dispatcher.addFilter(new CachingDispatcherFilter(
                cacheStorage,
                new CallbackFactory() {
                    public FilterawareRequestCallback createCallback(Method method) {
                        final FilterawareRequestCallback retryingCallback = new DefaultFilterawareRequestCallback(
                                method);

                        retryingCallback.addFilter(new CachingCallbackFilter(cacheStorage));
                        retryingCallback.addFilter(new ModelChangeCallbackFilter(eventBus));
                        return retryingCallback;
                    }
                }));

        Defaults.setDispatcher(dispatcher);

        /*
         *  setup the service, usually done in gin
         */
        Resource resource = new Resource(GWT.getModuleBaseURL());
        final ModelChangeAnnotatedService service = GWT.create(ModelChangeAnnotatedService.class);
        ((RestServiceProxy) service).setResource(resource);

        final ModelChangedEventHandlerImpl handler = new ModelChangedEventHandlerImpl();
        eventBus.addHandler(ModelChangeEvent.TYPE, handler);


        /*
         * first we create a client GET request to prepare all things as it
         * would be when displaying a list of items in the client.
View Full Code Here

    @Override
    public void gwtSetUp() {
        /*
         * configure RESTY to use cache, usually done in gin
         */
        final EventBus eventBus = new SimpleEventBus();
        final QueueableCacheStorage cacheStorage = new VolatileQueueableCacheStorage();
        final FilterawareDispatcher dispatcher = new DefaultFilterawareDispatcher();

        dispatcher.addFilter(new CachingDispatcherFilter(
                cacheStorage,
View Full Code Here

    */
   private void startNetmus() {
      
       // Create ClientFactory using deferred binding so we can replace with different impls in gwt.xml
       ClientFactory clientFactory = GWT.create(ClientFactory.class);
       EventBus eventBus = clientFactory.getEventBus();
       PlaceController placeController = clientFactory.getPlaceController();

       // Start ActivityManager for the main widget with our ActivityMapper
       ActivityMapper activityMapper = new NetmusActivityMapper(clientFactory);
       ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
View Full Code Here

     * to identify the view to show: If the path contains
     * "StandaloneEditor.html" then the StandaloneGuidedEditorManager is used to
     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        SuggestionCompletionCache.getInstance().setEventBus(eventBus);
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppControllerImpl(clientFactory,eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
View Full Code Here

     * to identify the view to show: If the path contains
     * "StandaloneEditor.html" then the StandaloneGuidedEditorManager is used to
     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppController(clientFactory,eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
            RootLayoutPanel.get().add(new StandaloneEditorManager(clientFactory, eventBus).getBaseLayout());
View Full Code Here

        when(
                navigationViewFactory.getGlobalAreaTreeItemView()
        ).thenReturn(
                globalAreaTreeItemView
        );
        EventBus eventBus = mock( EventBus.class );

        new ModulesTree( clientFactory ,eventBus, "AuthorPerspective");
    }
View Full Code Here

    @Test
    public void testStart() throws Exception {

        AcceptItem acceptTabItem = mock( AcceptItem.class );
        EventBus eventBus = mock( EventBus.class );      
        startActivity( acceptTabItem, eventBus );

        verify( view ).init(
                place.getMultiViewRows().toArray( new MultiViewRow[place.getMultiViewRows().size()] ),
                clientFactory,
View Full Code Here

        when(
                navigationViewFactory.getGlobalAreaTreeItemView()
        ).thenReturn(
                globalAreaTreeItemView
        );
        EventBus eventBus = mock( EventBus.class );

        presenter = new ModulesTree( clientFactory ,eventBus, "AuthorPerspective");
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.event.shared.EventBus

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.