com.sdm.quasar.client.core.dialog.services
Interface SessionCloseService

All Superinterfaces:
Service

public interface SessionCloseService
extends Service

A simple Service to allow to ask for closing the complete session running in. The session context here is ment as the current running context; e.g. it may stop the whole application in the case of a simple native client application, but may only stop a single session in a server-side client application (web).

Note: SystemInfoService is a core service and will therefore be available always for all dialogs in the dialog hierarchy. The Service will be provided at the session node (the root dialog of a session).

Version:
1.$Revision$
Author:
Thomas Wolf

Method Summary
 void abortSession(java.lang.Throwable reason)
          Requests to abort the session by an emergency shutdown.
 void closeSession()
          Requests to close the current session by normally shutting down.
 

Method Detail

closeSession

public void closeSession()
Requests to close the current session by normally shutting down. All dialogs of this session are closed. If the normal session shutdown results in errors, abortSession(Throwable) will be called. Note: No assumption about the work of the method should be made; it may be the case, that the closing is done instant; in this case every code after the call to this method is executed after dispoing! Otherwise it may be, that closing the session delays for some technical reason.


abortSession

public void abortSession(java.lang.Throwable reason)
Requests to abort the session by an emergency shutdown. All dialogs of this session are closed. None of the dialogs will be deactivated or released - aborting the session means disposing all dialogs immediately The given reason Throwable or any occuring exceptions will be logged. Note: No assumption about the work of the method should be made; it may be the case, that the closing is done instant; in this case every code after the call to this method is executed after dispoing! Otherwise it may be, that closing the session delays for some technical reason.

Parameters:
reason - an (optional) reason for aborting the session. The given Throwable will be logged while aborting.