final ListenerService<? extends ListenerService> service = createService(name, serverName, context, model, listenerOptions,socketOptions);
if (peerHostLookup) {
service.addWrapperHandler(new HandlerWrapper() {
@Override
public HttpHandler wrap(HttpHandler handler) {
return new PeerNameResolvingHandler(handler);
}
});
}
final ServiceBuilder<? extends ListenerService> serviceBuilder = context.getServiceTarget().addService(listenerServiceName, service);