Search in sources :

Example 6 with ResourceDTO

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

the class ResourceDTOBuilder method build.

/**
 * Build a servlet DTO from a servlet handler
 * @param handler The servlet handler
 * @param reason If reason is -1, a servlet DTO is created, otherwise a failed servlet DTO is returned
 * @return A servlet DTO
 */
public static ResourceDTO build(final ServletHandler handler, final int reason) {
    final ResourceDTO dto = build(handler.getServletInfo(), reason != -1);
    dto.servletContextId = handler.getContextServiceId();
    if (reason != -1) {
        ((FailedResourceDTO) dto).failureReason = reason;
    }
    return dto;
}
Also used : FailedResourceDTO(org.osgi.service.http.runtime.dto.FailedResourceDTO) ResourceDTO(org.osgi.service.http.runtime.dto.ResourceDTO)

Aggregations

FailedResourceDTO (org.osgi.service.http.runtime.dto.FailedResourceDTO)6 ResourceDTO (org.osgi.service.http.runtime.dto.ResourceDTO)6 Map (java.util.Map)2 FailedServletDTO (org.osgi.service.http.runtime.dto.FailedServletDTO)2 ServletDTO (org.osgi.service.http.runtime.dto.ServletDTO)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 TreeMap (java.util.TreeMap)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ServletInfo (org.apache.felix.http.base.internal.runtime.ServletInfo)1 ErrorPageDTO (org.osgi.service.http.runtime.dto.ErrorPageDTO)1 FailedErrorPageDTO (org.osgi.service.http.runtime.dto.FailedErrorPageDTO)1 FailedFilterDTO (org.osgi.service.http.runtime.dto.FailedFilterDTO)1 FailedListenerDTO (org.osgi.service.http.runtime.dto.FailedListenerDTO)1 FailedServletContextDTO (org.osgi.service.http.runtime.dto.FailedServletContextDTO)1 FilterDTO (org.osgi.service.http.runtime.dto.FilterDTO)1 ListenerDTO (org.osgi.service.http.runtime.dto.ListenerDTO)1 RuntimeDTO (org.osgi.service.http.runtime.dto.RuntimeDTO)1 ServletContextDTO (org.osgi.service.http.runtime.dto.ServletContextDTO)1