if (null != observer) {
LOG.info("registering incoming observer: " + observer);
try {
URL url = new URL(getAddressValue());
if (contextMatchOnExact()) {
engine.addServant(url, new AbstractHttpHandler() {
public void handle(String pathInContext, String pathParams, HttpRequest req,
HttpResponse resp) throws IOException {
if (pathInContext.equals(getName())) {
doService(req, resp);
}
}
});
} else {
engine.addServant(url, new AbstractHttpHandler() {
public void handle(String pathInContext, String pathParams, HttpRequest req,
HttpResponse resp) throws IOException {
if (pathInContext.startsWith(getName())) {
doService(req, resp);
}