public void unregisterHandler(String path) { pathHandler.removePrefixPath(path); // if there is registered location for given path, serve it from now on LocationService location = locations.get(path); if (location != null) { pathHandler.addPrefixPath(location.getLocationPath(), location.getLocationHandler()); } // else serve the default response code else if (path.equals("/")) { this.setupDefaultResponseCodeHandler(); } }
void registerLocation(LocationService location) { locations.put(location.getLocationPath(), location); registerHandler(location.getLocationPath(), location.getLocationHandler()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(location.getLocationPath(), Host.this)); }
public void unregisterHandler(String path) { pathHandler.removePrefixPath(path); // if there is registered location for given path, serve it from now on LocationService location = locations.get(path); if (location != null) { pathHandler.addPrefixPath(location.getLocationPath(), location.getLocationHandler()); } // else serve the default response code else if (path.equals("/")) { this.setupDefaultResponseCodeHandler(); } }
public void unregisterHandler(String path) { pathHandler.removePrefixPath(path); // if there is registered location for given path, serve it from now on LocationService location = locations.get(path); if (location != null) { pathHandler.addPrefixPath(location.getLocationPath(), location.getLocationHandler()); } // else serve the default response code else if (path.equals("/")) { this.setupDefaultResponseCodeHandler(); } }
void registerLocation(LocationService location) { locations.put(location.getLocationPath(), location); registerHandler(location.getLocationPath(), location.getLocationHandler()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(location.getLocationPath(), Host.this)); }
void registerLocation(LocationService location) { locations.put(location.getLocationPath(), location); registerHandler(location.getLocationPath(), location.getLocationHandler()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(location.getLocationPath(), Host.this)); }