}
private static class RuntimeInitialization extends AdditionalInitialization {
protected ControllerInitializer createControllerInitializer() {
ControllerInitializer ci = new ControllerInitializer() {
@Override
protected void initializeSocketBindingsOperations(List<ModelNode> ops) {
super.initializeSocketBindingsOperations(ops);
final String[] names = {"ajp", "http", "http-2", "https-non-default", "https-2", "ajps"};
final int[] ports = {8009, 8080, 8081, 8433, 8434, 8010};
for (int i = 0; i < names.length; i++) {
final ModelNode op = new ModelNode();
op.get(OP).set(ADD);
op.get(OP_ADDR).set(PathAddress.pathAddress(PathElement.pathElement(SOCKET_BINDING_GROUP, SOCKET_BINDING_GROUP_NAME),
PathElement.pathElement(SOCKET_BINDING, names[i])).toModelNode());
op.get(PORT).set(ports[i]);
ops.add(op);
}
}
};
// Adding a socket-binding is what triggers ControllerInitializer to set up the interface
// and socket-binding-group stuff we depend on TODO something less hacky
ci.addSocketBinding("make-framework-happy", 59999);
return ci;
}