public void execute(RuntimeTaskContext context) throws OperationFailedException {
int portOffset = resolvedOp.get(PORT_OFFSET).isDefined() ? resolvedOp.get(PORT_OFFSET).asInt() : 0;
String defaultInterface = resolvedOp.require(DEFAULT_INTERFACE).asString();
SocketBindingManagerService service = new SocketBindingManagerService(portOffset);
final ServiceTarget serviceTarget = context.getServiceTarget();
serviceTarget.addService(SocketBindingManager.SOCKET_BINDING_MANAGER, service)
.setInitialMode(ServiceController.Mode.ON_DEMAND)
.addDependency(NetworkInterfaceService.JBOSS_NETWORK_INTERFACE.append(defaultInterface), NetworkInterfaceBinding.class, service.getDefaultInterfaceBinding())
.install();
resultHandler.handleResultComplete();
}
});
} else {