Package org.zkoss.zk.ui.util
Interface SessionInit
-
public interface SessionInit
Used to initialize a session when it is created.How this interface is used.
- First, you specify a class that implements this interface in WEB-INF/zk.xml as a listener.
- Then, even time ZK loader creates a new session, an instance of
the specified class is instantiated and
init(org.zkoss.zk.ui.Session, java.lang.Object)
is called.
- Author:
- tomyeh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
init(Session sess, java.lang.Object request)
Called when a session is created and initialized.
-
-
-
Method Detail
-
init
void init(Session sess, java.lang.Object request) throws java.lang.Exception
Called when a session is created and initialized.If the client is based on HTTP (such as browsers), you could retrieve the HTTP session by
Session.getNativeSession()
- Parameters:
sess
- the session being created and initializedrequest
- the request caused the session being created. If HTTP and servlet, it is javax.servlet.http.HttpServletRequest. If portlet, it is javax.portlet.RenderRequest.- Throws:
java.lang.Exception
- Since:
- 3.0.1
-
-