Commit f0220381 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Initial version.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1540 b35dd754-fafc-0310-a699-88a17e54d16e
parent 12f7f546
package org.jivesoftware.messenger.component;
/**
* Holds the configuration for external components that want to connect to this server. The
* configuration specifies if the external component is allowed to connect to the server as well
* as the shared secret between the server and the component. If no secret or configuration was
* defined then the default shared secret will be used.
*
* @author Gaston Dombiak
*/
public class ExternalComponentConfiguration {
private String subdomain;
private Permission permission;
private String secret;
public ExternalComponentConfiguration(String subdomain) {
this.subdomain = subdomain;
}
public String getSubdomain() {
return subdomain;
}
public Permission getPermission() {
return permission;
}
public void setPermission(Permission permission) {
this.permission = permission;
}
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
public enum Permission {
/**
* The XMPP entity is allowed to connect to the server.
*/
allowed,
/**
* The XMPP entity is NOT allowed to connect to the server.
*/
blocked;
}
}
package org.jivesoftware.messenger.server;
/**
* Holds the configuration when connecting to/from a remote server. The configuration specifies
* if incoming or outgoing connections are allowed to the remote server and the port to use
* when creating an outgoing connection.
*
* @author Gaston Dombiak
*/
public class RemoteServerConfiguration {
private String domain;
private Permission permission;
private int remotePort;
public RemoteServerConfiguration(String domain) {
this.domain = domain;
}
public String getDomain() {
return domain;
}
public Permission getPermission() {
return permission;
}
public void setPermission(Permission permission) {
this.permission = permission;
}
public int getRemotePort() {
return remotePort;
}
public void setRemotePort(int remotePort) {
this.remotePort = remotePort;
}
public enum Permission {
/**
* The XMPP entity is allowed to connect to the server.
*/
allowed,
/**
* The XMPP entity is NOT allowed to connect to the server.
*/
blocked;
}
}
<%--
- $RCSfile$
- $Revision$
- $Date$
-
- Copyright (C) 2004 Jive Software. All rights reserved.
-
- This software is published under the terms of the GNU Public License (GPL),
- a copy of which is included in this distribution.
--%>
<%@ page import="org.jivesoftware.util.*,
java.util.*,
org.jivesoftware.messenger.*,
java.text.DateFormat,
java.text.NumberFormat,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.user.User,
org.xmpp.packet.JID,
org.xmpp.packet.Presence,
java.net.URLEncoder,
org.jivesoftware.messenger.server.IncomingServerSession,
org.jivesoftware.messenger.server.OutgoingServerSession,
org.jivesoftware.messenger.component.ComponentSession"
errorPage="error.jsp"
%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% // 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);
// Number dateFormatter for all numbers on this page:
NumberFormat numFormatter = NumberFormat.getNumberInstance();
%>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = LocaleUtils.getLocalizedString("component.session.details.title");
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(LocaleUtils.getLocalizedString("global.main"), "index.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "component-session-details.jsp?jid=" + jid));
pageinfo.setPageID("component-session-summary");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<p>
<fmt:message key="component.session.details.info">
<fmt:param value="<%= "<b>"+jid+"</b>" %>" />
</fmt:message>
</p>
<div class="jive-table">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<thead>
<tr>
<th colspan="2">
<fmt:message key="component.session.details.title" />
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="c1">
<fmt:message key="component.session.label.domain" />
</td>
<td>
<%= componentSession.getAddress() %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="component.session.label.name" />
</td>
<td>
<%= componentSession.getExternalComponent().getName() %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="component.session.label.category" />:
</td>
<td>
<%= componentSession.getExternalComponent().getCategory() %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="component.session.label.type" />:
</td>
<td>
<%= componentSession.getExternalComponent().getType() %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="component.session.label.creation" />
</td>
<td>
<%= JiveGlobals.formatDateTime(componentSession.getCreationDate()) %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="component.session.label.last_active" />
</td>
<td>
<%= JiveGlobals.formatDateTime(componentSession.getLastActiveDate()) %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="session.details.statistics" />
</td>
<td>
<fmt:message key="session.details.received" />
<%= numFormatter.format(componentSession.getNumClientPackets()) %>/<%= numFormatter.format(componentSession.getNumServerPackets()) %>
</td>
</tr>
<tr>
<td class="c1">
<fmt:message key="session.details.hostname" />
</td>
<td>
<%= componentSession.getConnection().getInetAddress().getHostAddress() %>
/
<%= componentSession.getConnection().getInetAddress().getHostName() %>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<form action="component-session-details.jsp">
<center>
<input type="submit" name="back" value="<fmt:message key="session.details.back_button" />">
</center>
</form>
<jsp:include page="bottom.jsp" flush="true" />
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment