Search in sources :

Example 6 with FailedListenerDTO

use of org.osgi.service.http.runtime.dto.FailedListenerDTO in project felix by apache.

the class HttpServicePlugin method printFailedListenerDetails.

private void printFailedListenerDetails(final PrintWriter pw, final RuntimeDTO dto) {
    if (dto.failedListenerDTOs.length == 0) {
        return;
    }
    pw.print("<p class=\"statline ui-state-highlight\">${Failed Listeners}</p>");
    pw.println("<table class=\"nicetable\">");
    pw.println("<thead><tr>");
    pw.println("<th class=\"header\">${Type}</th>");
    pw.println("<th class=\"header\">${Info}</th>");
    pw.println("</tr></thead>");
    boolean odd = true;
    for (final FailedListenerDTO ep : dto.failedListenerDTOs) {
        final StringBuilder sb = new StringBuilder();
        sb.append("${reason} : ").append(getErrorText(ep.failureReason)).append("\n");
        final ServiceReference<?> ref = this.getServiceReference(ep.serviceId);
        sb.append("${service.id} : ").append(String.valueOf(ep.serviceId)).append("\n");
        appendServiceRanking(sb, ref);
        if (ref != null) {
            sb.append("${bundle} : ");
            sb.append("${#link:");
            sb.append(ref.getBundle().getBundleId());
            sb.append("}");
            sb.append(ref.getBundle().getSymbolicName());
            sb.append("${link#}\n");
        }
        final StringBuilder tsb = new StringBuilder();
        for (final String t : ep.types) {
            tsb.append(t).append('\n');
        }
        odd = printRow(pw, odd, tsb.toString(), sb.toString());
    }
    pw.println("</table>");
}
Also used : FailedListenerDTO(org.osgi.service.http.runtime.dto.FailedListenerDTO)

Aggregations

FailedListenerDTO (org.osgi.service.http.runtime.dto.FailedListenerDTO)6 FailedErrorPageDTO (org.osgi.service.http.runtime.dto.FailedErrorPageDTO)3 FailedFilterDTO (org.osgi.service.http.runtime.dto.FailedFilterDTO)3 FailedResourceDTO (org.osgi.service.http.runtime.dto.FailedResourceDTO)3 FailedServletContextDTO (org.osgi.service.http.runtime.dto.FailedServletContextDTO)3 FailedServletDTO (org.osgi.service.http.runtime.dto.FailedServletDTO)3 ListenerDTO (org.osgi.service.http.runtime.dto.ListenerDTO)3 FailedPreprocessorDTO (org.osgi.service.http.runtime.dto.FailedPreprocessorDTO)2 RuntimeDTO (org.osgi.service.http.runtime.dto.RuntimeDTO)2 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 FilterInfo (org.apache.felix.http.base.internal.runtime.FilterInfo)1 ListenerInfo (org.apache.felix.http.base.internal.runtime.ListenerInfo)1 PreprocessorInfo (org.apache.felix.http.base.internal.runtime.PreprocessorInfo)1 ResourceInfo (org.apache.felix.http.base.internal.runtime.ResourceInfo)1 ServletContextHelperInfo (org.apache.felix.http.base.internal.runtime.ServletContextHelperInfo)1 ServletInfo (org.apache.felix.http.base.internal.runtime.ServletInfo)1 ErrorPageDTO (org.osgi.service.http.runtime.dto.ErrorPageDTO)1 FilterDTO (org.osgi.service.http.runtime.dto.FilterDTO)1 ResourceDTO (org.osgi.service.http.runtime.dto.ResourceDTO)1