jsp.lastN.jsp Maven / Gradle / Ivy
The newest version!
<%@ page language="java" import="java.util.*,java.io.*,com.netflix.eureka.*,com.netflix.eureka.registry.*,com.netflix.eureka.util.*" pageEncoding="UTF-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@page import="com.netflix.discovery.shared.Pair"%>
Eureka - Last N events
<%
EurekaServerContext serverContext = (EurekaServerContext) pageContext.getServletContext()
.getAttribute(EurekaServerContext.class.getName());
PeerAwareInstanceRegistry registry = serverContext.getRegistry();
List> list = registry.getLastNCanceledInstances();
out.print("");
out.print("Timestamp Lease ");
for (Pair entry : list) {
out.print("" + (new Date(entry.first().longValue()))
+ " " + entry.second() + " ");
}
out.println("
");
%>
<%
list = registry.getLastNRegisteredInstances();
out.print("");
out.print("Timestamp Lease ");
for (Pair entry : list) {
out.print("" + (new Date(entry.first().longValue()))
+ " " + entry.second() + " ");
}
out.println("
");
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy