@Override
public void configure(ServiceLocator habitat, NetworkListener networkListener,
ConfigBeanProxy configuration) {
if (configuration instanceof HttpRedirect) {
final HttpRedirect httpRedirectConfig = (HttpRedirect) configuration;
int port = Integer.parseInt(httpRedirectConfig.getPort());
redirectPort = port != -1 ? port : null;
secure = Boolean.parseBoolean(httpRedirectConfig.getSecure());
} else {
// Retained for backwards compatibility with legacy redirect declarations.
}
}