SessionCommand.java revision a14393818a78c503f7715c393044b33c86e90195
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 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: SessionCommand.java,v 1.9 2010/01/04 18:59:21 veiming Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
/**
* Displays active sessions.
*/
public class SessionCommand extends AuthenticatedCommand {
private Session curSession;
private SessionID curSessionID;
private final SessionCache sessionCache;
this.sessionCache = sessionCache;
}
public SessionCommand() {
this(SessionCache.getInstance());
}
super.handleRequest(rc);
try {
try {
} catch (AuthLoginException e) {
}
} catch (Exception e) {
}
}
}
}
} else {
"session-no-sessions"));
}
}
{
try {
boolean matched = true;
if (matched) {
} else {
}
}
if (matched) {
}
}
} catch (IOException ioe) {
}
}
{
try {
"ATTEMPT_SESSION_DESTROY", params);
"SUCCEED_SESSION_DESTROY", params);
} catch (SessionException se) {
"FAILED_SESSION_DESTROY", params);
}
}
private void invalidateSessions(
) throws CLIException
{
}
}
"session-destroy-session-succeeded"));
}
}
boolean match = false;
try {
} catch (NumberFormatException nfe) {
// ignore if user enters an non integer
}
return match;
}
) {
} else {
" ");
}
}
throws CLIException
{
}
filter = "*";
}
try {
} catch (SessionException se) {
}
}
len--;
}
return str;
}
throws CLIException
{
try {
}
boolean isCurrentSession = false;
int i = 0;
) {
boolean isCurr = false;
// need to check current session only if we have not found it.
if (!isCurrentSession) {
try {
} catch (SessionException se) {
throw new CLIException(se,
}
}
// -1 indicates that it is current session.
if (idx == -1) {
} else {
}
}
}
}
} catch (SessionException se) {
}
return list;
}
}
}
}
private SessionData createSessionData(
int index,
) throws SessionException
{
return sData;
}
/**
* This class stores session information
*/
private class SessionData {
private int index = 0;
}
}
return dn;
}
}