use of org.osgi.service.http.runtime.dto.ServletDTO in project felix by apache.
the class HttpServiceRuntimeTest method assertServlet.
private void assertServlet(final ServletDTO[] servletDTOs, final String name, final long contextServiceId) {
assertNotNull(servletDTOs);
for (final ServletDTO dto : servletDTOs) {
if (name.equals(dto.name) && contextServiceId == dto.servletContextId) {
return;
}
}
fail("Servlet with name " + name + " and context id " + contextServiceId + " not found in " + Arrays.toString(servletDTOs));
}
use of org.osgi.service.http.runtime.dto.ServletDTO in project felix by apache.
the class ServletDTOBuilder 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 ServletDTO build(final ServletHandler handler, final int reason) {
final ServletDTO dto = build(handler.getServletInfo(), reason);
BaseServletDTOBuilder.fill(dto, handler);
return dto;
}
Aggregations