/** * * @since 2.1 * @return */ public int getSessionMaxInactiveInterval() { ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get(); if (ctx == null) { throw new UnsupportedOperationException(); } return ctx.getSessionMaxInactiveInterval(); }
/** * <p class="changed_added_2_1">Returns the maximum time interval, in seconds, that * the servlet container will keep this session open between client accesses. * After this interval, the servlet container will invalidate the session. * The maximum time interval can be set with the * {@link #setSessionMaxInactiveInterval} method. </p> * * <p class="changed_added_2_1">A return value of zero or less indicates * that the session will never timeout. </p> * * <p><em>Servlet:</em> This must return the result of calling * <code>getMaxInactiveInterval</code> on the underlying * <code>javax.servlet.http.HttpServletRequest</code> instance.</p> * * <p>The default implementation throws * <code>UnsupportedOperationException</code> and is provided * for the sole purpose of not breaking existing applications that extend * this class.</p> * * @since 2.1 */ public int getSessionMaxInactiveInterval() { int result = 0; if (defaultExternalContext != null) { result = defaultExternalContext.getSessionMaxInactiveInterval(); } else { throw new UnsupportedOperationException(); } return result; }
int result = 0; if (defaultExternalContext != null) { result = defaultExternalContext.getSessionMaxInactiveInterval(); } else { throw new UnsupportedOperationException();
/** * <p class="changed_added_2_2">The default behavior of this method is to * call {@link ExternalContext#getSessionMaxInactiveInterval()} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getSessionMaxInactiveInterval() */ @Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
int result = 0; if (defaultExternalContext != null) { result = defaultExternalContext.getSessionMaxInactiveInterval(); } else { throw new UnsupportedOperationException();
/** * <p class="changed_added_2_2">The default behavior of this method is to * call {@link ExternalContext#getSessionMaxInactiveInterval()} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getSessionMaxInactiveInterval() */ @Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
@Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
int result = 0; if (defaultExternalContext != null) { result = defaultExternalContext.getSessionMaxInactiveInterval(); } else { throw new UnsupportedOperationException();
int result = 0; if (defaultExternalContext != null) { result = defaultExternalContext.getSessionMaxInactiveInterval(); } else { throw new UnsupportedOperationException();
int result = 0; if (defaultExternalContext != null) { result = defaultExternalContext.getSessionMaxInactiveInterval(); } else { throw new UnsupportedOperationException();
/** * <p class="changed_added_2_2">The default behavior of this method is to * call {@link ExternalContext#getSessionMaxInactiveInterval()} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getSessionMaxInactiveInterval() */ @Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
/** * <p class="changed_added_2_2">The default behavior of this method is to * call {@link ExternalContext#getSessionMaxInactiveInterval()} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getSessionMaxInactiveInterval() */ @Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
int result = 0; if (defaultExternalContext != null) { result = defaultExternalContext.getSessionMaxInactiveInterval(); } else { throw new UnsupportedOperationException();
/** * <p class="changed_added_2_2">The default behavior of this method is to * call {@link ExternalContext#getSessionMaxInactiveInterval()} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getSessionMaxInactiveInterval() */ @Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
/** * <p class="changed_added_2_2">The default behavior of this method is to * call {@link ExternalContext#getSessionMaxInactiveInterval()} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getSessionMaxInactiveInterval() */ @Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
/** * <p class="changed_added_2_2">The default behavior of this method is to * call {@link ExternalContext#getSessionMaxInactiveInterval()} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getSessionMaxInactiveInterval() */ @Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
int result = 0; if (defaultExternalContext != null) { result = defaultExternalContext.getSessionMaxInactiveInterval(); } else { throw new UnsupportedOperationException();
/** * <p class="changed_added_2_2">The default behavior of this method is to * call {@link ExternalContext#getSessionMaxInactiveInterval()} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getSessionMaxInactiveInterval() */ @Override public int getSessionMaxInactiveInterval() { return getWrapped().getSessionMaxInactiveInterval(); }
public void processEvent(final SystemEvent event) throws AbortProcessingException { FacesContext context = FacesContext.getCurrentInstance(); ExternalContext externalContext = context.getExternalContext(); long maxInactiveInterval = externalContext.getSessionMaxInactiveInterval() * 1000; long deltaTime = maxInactiveInterval - intervalBeforeExpiry; UIComponent bodyComponent = (UIComponent) event.getSource(); String code; if (EnvUtils.isPushRequest(context)) { code = ""; } else { //use random comment to force DOM diffing into sending the call to ice.resetSessionExpiryTimeout //this approach will work even when submits are not triggered by ICEfaces (as opposed to using a submit callback on the client) code = ("ice.resetSessionExpiryTimeout(" + deltaTime + "," + intervalBeforeExpiry + ");//" + RANDOM.nextInt()); } UIComponent c = new ScriptWriter(bodyComponent, code, "reset_session_expiry_timeout"); bodyComponent.getChildren().add(c); }