public void addListener(SessionListener sessionListener) {
   ServletExternalContext.SessionListeners listeners =
       (ServletExternalContext.SessionListeners)
           portletSession.getAttribute(
               ServletExternalContext.SESSION_LISTENERS, PortletSession.APPLICATION_SCOPE);
   if (listeners == null) {
     listeners = new ServletExternalContext.SessionListeners();
     portletSession.setAttribute(
         ServletExternalContext.SESSION_LISTENERS, listeners, PortletSession.APPLICATION_SCOPE);
   }
   listeners.addListener(sessionListener);
 }
 public void removeListener(SessionListener sessionListener) {
   final ServletExternalContext.SessionListeners listeners =
       (ServletExternalContext.SessionListeners)
           portletSession.getAttribute(
               ServletExternalContext.SESSION_LISTENERS, PortletSession.APPLICATION_SCOPE);
   if (listeners != null) listeners.removeListener(sessionListener);
 }
 public void setMaxInactiveInterval(int interval) {
   portletSession.setMaxInactiveInterval(interval);
 }
 public void invalidate() {
   portletSession.invalidate();
 }
 public boolean isNew() {
   return portletSession.isNew();
 }
 public int getMaxInactiveInterval() {
   return portletSession.getMaxInactiveInterval();
 }
 public long getLastAccessedTime() {
   return portletSession.getLastAccessedTime();
 }
 public String getId() {
   return portletSession.getId();
 }
 public long getCreationTime() {
   return portletSession.getCreationTime();
 }
 public void sessionInvalidate() {
   PortletSession session = portletRequest.getPortletSession(false);
   if (session != null) session.invalidate();
 }