A programming model for adaptable Java applications