com.mizar.faces.javax.session
Class SessionLogRecord

java.lang.Object
  extended by com.mizar.persistence.jpa.beans.GenericBean
      extended by com.mizar.faces.beans.SessionLogBean
          extended by com.mizar.faces.javax.session.SessionLogRecord
All Implemented Interfaces:
JPAInterface, java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
SessionLogRow

public class SessionLogRecord
extends SessionLogBean

See Also:
Serialized Form

Field Summary
static java.util.logging.Logger _Logger
           
protected  java.util.Date activityTime
           
protected  java.lang.Boolean admin
           
protected  boolean closed
           
protected  java.lang.String currentDetailItem
           
protected  java.lang.String currentPage
           
protected  SessionLogs facade
           
protected  javax.faces.context.FacesContext facesContext
           
protected  javax.servlet.http.HttpSession httpSession
           
protected  long maxInactiveMillisecs
           
protected  double maxInactiveMinutes
           
protected  java.util.Date pageTime
           
protected  SessionConstants session
           
 
Fields inherited from class com.mizar.faces.beans.SessionLogBean
ACTIVITY_KILLED, ACTIVITY_LOGIN, ACTIVITY_LOGOUT, ACTIVITY_TIMEDOUT
 
Fields inherited from class com.mizar.persistence.jpa.beans.GenericBean
_logger, DELETE, EDIT, NEW, READ, serialVersionUID
 
Constructor Summary
SessionLogRecord()
           
 
Method Summary
 void closeRecord()
          Sets both httpSession and session to null, indicating that the session has been terminated
 java.util.Date getActivityTime()
           
 java.lang.Boolean getAdmin()
           
 java.lang.String getCurrentDetailItem()
           
 java.lang.String getCurrentPage()
           
 javax.faces.context.FacesContext getFacesContext()
           
 javax.servlet.http.HttpSession getHttpSession()
           
static SessionLogRecord getInstance()
           
static SessionLogRecord getInstance(SessionLogBean slb)
           
 double getMaxInactiveMinutes()
           
 java.util.Date getPageTime()
           
 boolean isActive()
           
 boolean isClosed()
           
 boolean isKillable()
          To be killable the recipient must have both sysAdmin and superUser privileges and the polling interval must be set to manual.
 void logoff()
           
 void removeLostSession()
           
protected  void setActivityTime(java.util.Date activityTime)
           
protected  void setAdmin(java.lang.Boolean admin)
           
protected  void setClosed(boolean closed)
           
protected  void setCurrentDetailItem(java.lang.String currentDetailItem)
           
protected  void setCurrentPage(java.lang.String currentPage)
           
 void setFacesContext(javax.faces.context.FacesContext facesContext)
           
protected  void setHttpSession(javax.servlet.http.HttpSession httpSession)
           
 void setMaxInactiveMinutes(int minutes)
           
protected  void setPageTime(java.util.Date pageTime)
           
 void timedOut()
          Sets the lastActive proprty to "Timed Out" if the lastActivity is not already set to "Logged Off" or "Killed"
 void updateInactiveMinutes()
           
 void updateLastAccessTime()
           
 void updateSessionMinutes()
           
 
Methods inherited from class com.mizar.faces.beans.SessionLogBean
getBrowser, getContextName, getId, getInactiveMinutes, getIpAddress, getLastAccess, getLastActivity, getLogin, getLogoff, getMvRequests, getOs, getRowsFetched, getSessionId, getSessionMinutes, getSqlRequests, getUserAgent, getUsername, incMvRequests, incRowsFetched, incSqlRequests, setContextName, setId, setInactiveMinutes, setIpAddress, setLastAccess, setLastActivity, setLogin, setLogoff, setMvRequests, setRowsFetched, setSessionId, setSessionMinutes, setSqlRequests, setUserAgent, setUsername
 
Methods inherited from class com.mizar.persistence.jpa.beans.GenericBean
compareTo, equals, getDELETE, getEDIT, getEntityState, getEntityStateLabel, getLogger, getNEW, getPrimaryKeyValue, getREAD, hashCode, isEditable, isNew, setEditable, setEntityState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_Logger

public static java.util.logging.Logger _Logger

httpSession

protected javax.servlet.http.HttpSession httpSession

facesContext

protected javax.faces.context.FacesContext facesContext

currentPage

protected java.lang.String currentPage

currentDetailItem

protected java.lang.String currentDetailItem

pageTime

protected java.util.Date pageTime

activityTime

protected java.util.Date activityTime

maxInactiveMinutes

protected double maxInactiveMinutes

maxInactiveMillisecs

protected long maxInactiveMillisecs

closed

protected boolean closed

session

protected SessionConstants session

facade

protected SessionLogs facade

admin

protected java.lang.Boolean admin
Constructor Detail

SessionLogRecord

public SessionLogRecord()
Method Detail

getInstance

public static SessionLogRecord getInstance()
Returns:
a new SessionLogRecord with required defaults set

getInstance

public static SessionLogRecord getInstance(SessionLogBean slb)

getHttpSession

public javax.servlet.http.HttpSession getHttpSession()
Returns:
ServletUtils.validateHttpSession(HttpSession)
See Also:
ServletUtils.validateHttpSession(HttpSession)

closeRecord

public void closeRecord()
Sets both httpSession and session to null, indicating that the session has been terminated


isActive

public boolean isActive()
Returns:
true if httpSession is not null and is valid
See Also:
ServletUtils.validateHttpSession(HttpSession)

isKillable

public boolean isKillable()
To be killable the recipient must have both sysAdmin and superUser privileges and the polling interval must be set to manual.

Returns:
true if the session is killable by the current recipient in the current environment

logoff

public void logoff()

removeLostSession

public void removeLostSession()

timedOut

public void timedOut()
Sets the lastActive proprty to "Timed Out" if the lastActivity is not already set to "Logged Off" or "Killed"


updateSessionMinutes

public void updateSessionMinutes()

updateLastAccessTime

public void updateLastAccessTime()

updateInactiveMinutes

public void updateInactiveMinutes()

setMaxInactiveMinutes

public void setMaxInactiveMinutes(int minutes)
Parameters:
minutes - of inactivity before the servlet should timeout the session
See Also:
HttpSession.setMaxInactiveInterval(int)

getMaxInactiveMinutes

public double getMaxInactiveMinutes()
Returns:
httpSession.getMaxInactiveInterval/60

setHttpSession

protected void setHttpSession(javax.servlet.http.HttpSession httpSession)

setCurrentPage

protected void setCurrentPage(java.lang.String currentPage)

getCurrentPage

public java.lang.String getCurrentPage()

setCurrentDetailItem

protected void setCurrentDetailItem(java.lang.String currentDetailItem)

getCurrentDetailItem

public java.lang.String getCurrentDetailItem()

setPageTime

protected void setPageTime(java.util.Date pageTime)

getPageTime

public java.util.Date getPageTime()

setActivityTime

protected void setActivityTime(java.util.Date activityTime)

getActivityTime

public java.util.Date getActivityTime()

setClosed

protected void setClosed(boolean closed)

isClosed

public boolean isClosed()

setAdmin

protected void setAdmin(java.lang.Boolean admin)

getAdmin

public java.lang.Boolean getAdmin()

setFacesContext

public void setFacesContext(javax.faces.context.FacesContext facesContext)

getFacesContext

public javax.faces.context.FacesContext getFacesContext()