SessionInfo.java revision 0fb4093da08d574d3d1b661d4425dfbac8e02aab
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SessionInfo.java,v 1.3 2008/06/25 05:41:31 qcheng Exp $
*
*/
/**
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
/**
* <code>SessionInfo</code> class holds all the information about the
* <code>Session</code>
*/
public class SessionInfo {
private static final char QUOTE = '\"';
private static final char NL = '\n';
private long maxtime;
private long maxidle;
private long maxcaching;
private long expiryTime;
private long lastActivityTime;
/**
* Constructs <code> SessionInfo </code>
*/
public SessionInfo() {
}
/**
* translates the <code>Session</code> Information to an XML document
* String based
*
* @return An XML String representing the information
*/
public String toXMLString() {
NL);
if (properties != null) {
while (enumerator.hasMoreElements()) {
}
}
}
/**
* <code>Session</code> id
*/
public String getSessionID() {
return sid;
}
}
return secret;
}
}
/**
* <code>Session</code> type
*/
public String getSessionType() {
return stype;
}
}
/**
* <code>Cookie</code> id
*/
public String getClientID() {
return cid;
}
}
/**
* <code> Cookie</code> domain
*/
public String getClientDomain() {
return cdomain;
}
}
/**
* Max <code>Session</code> Time in minutes.
*/
public long getMaxTime() {
return maxtime;
}
public void setMaxTime(final long maxtime) {
}
/**
* Max <code>Session</code> Idle time in minutes.
*/
public long getMaxIdle() {
return maxidle;
}
public void setMaxIdle(final long maxidle) {
}
/**
* Max <code>Session</code> Cache time in minutes.
*/
public long getMaxCaching() {
return maxcaching;
}
public void setMaxCaching(final long maxcaching) {
this.maxcaching = maxcaching;
}
/**
* Time at which this session will expire in milliseconds from the UTC epoch.
*/
public long getExpiryTime() {
return expiryTime;
}
public void setExpiryTime(final long expiryTime) {
this.expiryTime = expiryTime;
}
/**
* Indicates that the session should never expire.
*
* @param neverExpiring {@code true} if the session should never expire. If {@code false} this method does nothing.
*/
public void setNeverExpiring(final boolean neverExpiring) {
if (neverExpiring) {
}
}
/**
* Whether the session will ever expire or not.
*/
public boolean isNeverExpiring() {
}
/**
* Time at which there was last activity on this session as milliseconds from the UTC epoch.
*/
public long getLastActivityTime() {
return lastActivityTime;
}
public void setLastActivityTime(final long lastActivityTime) {
this.lastActivityTime = lastActivityTime;
}
/**
* <code>Session</code> idle time in seconds.
*/
public long getTimeIdle() {
if (isNeverExpiring()) {
return 0;
} else {
}
}
public void setTimeIdle(final long timeidle) {
}
/**
* Time left for <code>Session</code> to become inactive, in seconds.
*/
public long getTimeLeft() {
if (isNeverExpiring()) {
} else {
}
}
public void setTimeLeft(final long timeleft) {
// Check for overflow - expiryTime should always be positive
if (expiryTime < 0) {
}
}
/**
* <code>Session</code> state
*/
return state;
}
}
return properties;
}
this.properties = properties;
}
if (this == o) {
return true;
}
return false;
}
}
public int hashCode() {
return result;
}
return "SessionInfo{" +
", maxtime=" + maxtime +
", maxidle=" + maxidle +
", maxcaching=" + maxcaching +
", expiryTime=" + expiryTime +
", lastActivityTime=" + lastActivityTime +
", properties=" + properties +
'}';
}
}