/** * Return the {@link AtmosphereHandler} mapped to the passed servlet-path. * * @param req the {@link AtmosphereResponse} * @return the {@link AtmosphereHandler} mapped to the passed servlet-path. * @throws javax.servlet.ServletException */ protected AtmosphereHandlerWrapper map(AtmosphereRequest req) throws ServletException { AtmosphereHandlerWrapper atmosphereHandlerWrapper = mapper.map(req, config.handlers()); if (atmosphereHandlerWrapper == null) { logger.debug("No AtmosphereHandler maps request for {} with mapping {}", req.getRequestURI(), config.handlers()); throw new AtmosphereMappingException("No AtmosphereHandler maps request for " + req.getRequestURI()); } return atmosphereHandlerWrapper; }
public void initEndpointMapper() { String s = servletConfig.getInitParameter(ApplicationConfig.ENDPOINT_MAPPER); if (s != null) { try { endpointMapper = newClassInstance(EndpointMapper.class, (Class<EndpointMapper>) IOUtils.loadClass(this.getClass(), s)); logger.info("Installed EndpointMapper {} ", s); } catch (Exception ex) { logger.error("Cannot load the EndpointMapper {}", s, ex); } } endpointMapper.configure(config); }
WebSocketHandler proxy = null; if (!handlers.isEmpty()) { WebSocketHandlerProxy handler = mapper.map(request, handlers); if (handler == null) { logger.debug("No WebSocketHandler maps request for {} with mapping {}", request.getRequestURI(), handlers);
public boolean matchPath(String path) { try { return mapper.map(path, framework().getAtmosphereHandlers()) == null ? false : true; } catch (IllegalArgumentException ex) { return false; } }
public boolean matchPath(String path) { return mapper.map(path, framework().getAtmosphereHandlers()) == null ? false : true; }