I have a portal with different available portlets. My Activity
portlet has some background threads which must be stopped when the portlet is unloaded (for example, when selecting another portlet). The Activity portlet is of class GenericPortletApplication
, which implements the following interfaces:
import com.vaadin.Application;
import com.vaadin.terminal.gwt.server.PortletApplicationContext2;
public abstract class GenericPortletApplication extends Application implements PortletApplicationContext2.PortletListener {
...
}
I would like to know which method I can overload to make sure I will handle the closing of the application properly. I have tried destroy
but this is not implemented.
The interfaces are defined here and here but I can not find the method which will be called when the application is unloaded.
In Vaadin the Application.close() is the method that is invoked when an application session is closed. Remember that is bound to session, not the whole application.