Directory

← Back

ICEPush

Push support for Vaadin 6 and 7 using ICEPush

Author

Rating

Popularity

<100

Note:

This add-on is unnecessary since Vaadin 7.2. The built in push mechanism is more performant and more reliable and should be used instead of this add-on.

A component that adds push support to Vaadin!

Add the component to your application and call push() in a background server thread to update the application.

Note that you must use org.vaadin.artur.icepush.ICEPushServlet instead of com.vaadin.terminal.gwt.server.ApplicationServlet.

Based on ICEPush 2.0.0 alpha 3. Make sure that you add icepush.jar and icepush-gwt.jar to your WEB-INF/lib.

To use in a portlet you can use the same servlet to provide push capabilities. You need to add a web.xml that contians the following (headers, footers omitted):

<servlet>
    <servlet-name>ICEPush for Portlets</servlet-name>
    <servlet-class>org.vaadin.artur.icepush.ICEPushServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>ICEPush for Portlets</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

Please note that the add-on uses Servlet API 2.5 so you need a servlet container that supports that version (e.g. Tomcat 6.0 or newer)

Sample code

public class ICEPushDemo extends Application {

    private ICEPush pusher = new ICEPush();

    @Override
    public void init() {
        Window mainWindow = new Window("Icepushaddon Application");
        setMainWindow(mainWindow);

        // Add the push component
        mainWindow.addComponent(pusher);

        // Add a button for starting background work
        getMainWindow().addComponent(
                new Button("Do stuff in the background", new ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        getMainWindow()
                                .addComponent(
                                        new Label(
                                                "Waiting for background process to complete..."));
                        new BackgroundThread().start();
                    }
                }));

    }

    public class BackgroundThread extends Thread {

        @Override
        public void run() {
            // Simulate background work
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
            }

            // Update UI
            synchronized (ICEPushDemo.this) {
                getMainWindow().addComponent(new Label("All done"));
            }

            // Push the changes
            pusher.push();
        }

    }
}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Fixes a bug where updates would not be rendered until user does something, e.g. move the mouse

Released
2015-12-20
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Vaadin 6.0+ in 0.2.1
Vaadin 6.3+ in 0.2.0
Browser
Internet Explorer
Internet Explorer
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Internet Explorer
iOS Browser
Android Browser
Internet Explorer
Internet Explorer

ICEPush - Vaadin Add-on Directory

Push support for Vaadin 6 and 7 using ICEPush ICEPush - Vaadin Add-on Directory
**Note:** **This add-on is unnecessary since Vaadin 7.2. The built in push mechanism is more performant and more reliable and should be used instead of this add-on.** A component that adds push support to Vaadin! Add the component to your application and call push() in a background server thread to update the application. Note that you must use org.vaadin.artur.icepush.ICEPushServlet instead of com.vaadin.terminal.gwt.server.ApplicationServlet. Based on ICEPush 2.0.0 alpha 3. Make sure that you add icepush.jar and icepush-gwt.jar to your WEB-INF/lib. To use in a portlet you can use the same servlet to provide push capabilities. You need to add a web.xml that contians the following (headers, footers omitted): ICEPush for Portlets org.vaadin.artur.icepush.ICEPushServlet 1 ICEPush for Portlets /* Please note that the add-on uses Servlet API 2.5 so you need a servlet container that supports that version (e.g. Tomcat 6.0 or newer)
Basic demo
Simple chat application
Add-on Source Code
Multi-user Calendar (Vaadin 6)
Multi-user Calendar source code (Vaadin 6)
Discussion Forum
Multi-user Calendar (Vaadin 7)
Multi-user Calendar source code (Vaadin 7)

ICEPush version 0.1.2
null

ICEPush version 0.1.3
No longer requires the URL to end in a slash

ICEPush version 0.2.0
No longer requires the URL to end in a slash Portlet support

ICEPush version 0.2.1
Java 1.5 compatibility Component no longer remains active after being removed

ICEPush version 0.5.0
Vaadin 7 compatibility

ICEPush version 0.5.1
Supports Vaadin 7.0.0.beta1

ICEPush version 0.5.2
Supports Vaadin 7.0.0.beta9 Changed to be an extension. Attach to your UI using IcePush.extend(myUI)

ICEPush version 0.5.3
Compatible with 7.0.0.beta10

ICEPush version 0.5.4
Works with rc1

ICEPush version 0.5.5
No longer emits warning messages when pushing

ICEPush version 0.5.6
Fixes a bug where updates would not be rendered until user does something, e.g. move the mouse

Online