5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * The contents of this file are subject to the terms
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * of the Common Development and Distribution License
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * (the License). You may not use this file except in
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * compliance with the License.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * You can obtain a copy of the License at
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * https://opensso.dev.java.net/public/CDDLv1.0.html or
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * See the License for the specific language governing
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * permission and limitations under the License.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * When distributing Covered Code, include this CDDL
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Header Notice in each file and include the License file
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * If applicable, add the following below the CDDL Header,
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * with the fields enclosed by brackets [] replaced by
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * your own identifying information:
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * "Portions Copyrighted [year] [name of copyright owner]"
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * $Id: AccessAccept.java,v 1.2 2008/06/25 05:42:00 qcheng Exp $
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Portions Copyrighted [2011] [ForgeRock AS]
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Portions Copyrighted [2015] [Intellectual Reserve, Inc (IRI)]
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenpackage org.forgerock.openam.radius.common.packet;
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenimport org.forgerock.openam.radius.common.Attribute;
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenimport org.forgerock.openam.radius.common.AttributeType;
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenimport org.forgerock.openam.radius.common.OctetUtils;
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Class representing the structure of the Session-Timeout field as specified in section 5.27 of RFC 2865 and able to be
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * instantiated from the on-the-wire bytes or model objects.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowenpublic class SessionTimeoutAttribute extends Attribute {
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * The maximum number of seconds of service to be provided to the user before termination of the session or prompt.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Constructs a new instance from the on-the-wire bytes for this attribute including the prefixing attribute-type
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * code octet and length octet.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @param octets the on-the-wire bytes from which to construct this instance
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Construct an instance to hold the indicated maximum number of seconds of service.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @param timeout the maximum number of seconds of service.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen super(OctetUtils.toOctets(AttributeType.SESSION_TIMEOUT, timeout));
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Returns the timeout value in seconds.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @return the timeout value.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * Used by super class to log the attribute's contents when packet logging is enabled.
5c124de5c36bfc236d55578429df5f048f0d0a07Jamie Bowen * @return content representation for traffic logging