<%@ page contentType="text/html; charset=UTF-8" %> <%-- - - Copyright (C) 2004-2008 Jive Software, 2017-2022 Ignite Realtime Foundation. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --%> <%@ page import="org.jivesoftware.openfire.SessionManager, org.jivesoftware.openfire.session.ComponentSession, org.jivesoftware.util.JiveGlobals, org.jivesoftware.util.StringUtils, org.jivesoftware.util.ParamUtils" errorPage="error.jsp" %> <%@ page import="java.text.NumberFormat" %> <%@ page import="java.util.Map" %> <%@ page import="java.util.TreeMap" %> <%@ page import="org.slf4j.Logger" %> <%@ page import="org.slf4j.LoggerFactory" %> <%@ page import="org.jivesoftware.openfire.cluster.ClusterManager" %> <%@ page import="org.jivesoftware.openfire.session.LocalSession" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <% webManager.init(request, response, session, application, out ); %> <% // Get parameters String jid = ParamUtils.getParameter(request, "jid"); // Handle a "go back" click: if (request.getParameter("back") != null) { response.sendRedirect("component-session-summary.jsp"); return; } // Get the session & address objects SessionManager sessionManager = webManager.getSessionManager(); ComponentSession componentSession = sessionManager.getComponentSession(jid); pageContext.setAttribute( "componentSession", componentSession ); // Number dateFormatter for all numbers on this page: NumberFormat numFormatter = NumberFormat.getNumberInstance(); final Logger Log = LoggerFactory.getLogger("component-session-details.jsp"); pageContext.setAttribute("clusteringEnabled", ClusterManager.isClusteringStarted() || ClusterManager.isClusteringStarting() ); %> <fmt:message key="component.session.details.title"/>

<% if (componentSession.isEncrypted()) { %> <% } %>
: <%=StringUtils.escapeHTMLTags(componentSession.getTLSProtocolName())%>
: <%=StringUtils.escapeHTMLTags(componentSession.getCipherSuiteName())%>
:
: AIM  IRC 
<% if (componentSession instanceof LocalSession) { %> <% } else { %> <% } %>
<%= JiveGlobals.formatDateTime(componentSession.getCreationDate()) %>
<%= JiveGlobals.formatDateTime(componentSession.getLastActiveDate()) %>
<%= numFormatter.format(componentSession.getNumClientPackets()) %>/<%= numFormatter.format(componentSession.getNumServerPackets()) %>
<% try { %> <%= StringUtils.escapeHTMLTags(componentSession.getHostAddress()) %> / <%= StringUtils.escapeHTMLTags(componentSession.getHostName()) %> <% } catch (java.net.UnknownHostException e) { %> Invalid session/connection <% } %>

<% // Show Software Version if there is : try { if (!componentSession.getSoftwareVersion().isEmpty()) { %>
<% Map treeMap = new TreeMap<>(componentSession.getSoftwareVersion()); for (Map.Entry entry : treeMap.entrySet()){ %> <% } %>
<%= StringUtils.escapeHTMLTags(entry.getKey().substring(0, 1).toUpperCase()+""+entry.getKey().substring(1)) %>: <%= StringUtils.escapeHTMLTags(entry.getValue())%>
<% } } catch (Exception e) { Log.error(e.getMessage(), e);%> Invalid session/connection <%} %>
">