grizzlyListener = new GrizzlyListener(grizzlyService.getMonitoring(), new Controller(){
public void logVersion(){}
}, networkListener.getName());
final Protocol httpProtocol = networkListener.findHttpProtocol();
V3Mapper mapper = null;
// mapper initialization now happens *before* the GrizzlyListener
// is configured. This is necessary for WebSocket support (if enabled).
if (httpProtocol != null) {
mapper = new V3Mapper(logger);
mapper.setPort(portNumber);
mapper.setId(networkListener.getName());
Inhabitant<Mapper> onePortMapper = new ExistingSingletonInhabitant<Mapper>(mapper);
grizzlyService.getHabitat().addIndex(onePortMapper,
Mapper.class.getName(),
(networkListener.getAddress() + networkListener.getPort()));
}