return null;
}
}
private static ServletInfo getServletInfo(Wrapper w, String contextName) {
ServletInfo si = new ServletInfo();
si.setApplicationName(contextName.length() > 0 ? contextName : "/");
si.setServletName(w.getName());
si.setServletClass(w.getServletClass());
si.setAvailable(! w.isUnavailable());
si.setLoadOnStartup(w.getLoadOnStartup());
si.setRunAs(w.getRunAs());
String[] ms = w.findMappings();
for (int i = 0; i < ms.length; i++) {
si.getMappings().add(ms[i]);
}
if (w instanceof StandardWrapper) {
StandardWrapper sw = (StandardWrapper) w;
si.setAllocationCount(sw.getCountAllocated());
si.setErrorCount(sw.getErrorCount());
si.setLoadTime(sw.getLoadTime());
si.setMaxInstances(sw.getMaxInstances());
si.setMaxTime(sw.getMaxTime());
si.setMinTime(sw.getMinTime() == Long.MAX_VALUE ? 0 : sw.getMinTime());
si.setProcessingTime(sw.getProcessingTime());
si.setRequestCount(sw.getRequestCount());
si.setSingleThreaded(sw.isSingleThreadModel());
}
return si;
}