@Override
public Object run(LoadBalancer loadBalancer) throws
PropertyVetoException, TransactionFailure {
List<Property> propertyList = loadBalancer.getProperty();
Property deviceHostProperty = loadBalancer.getProperty(
DEVICE_HOST_PROPERTY);
if (deviceHostProperty != null) {
propertyList.remove(deviceHostProperty);
loadBalancer.setDeviceHost(deviceHostProperty.getValue());
} else {
String msg = LbLogUtil.getStringManager().getString(
"DeviceHostNotFound", loadBalancer.getName());
Logger.getAnonymousLogger().log(Level.SEVERE, msg);
loadBalancer.setDeviceHost("localhost");
}
Property devicePortProperty = loadBalancer.getProperty(
DEVICE_ADMIN_PORT_PROPERTY);
if (devicePortProperty != null) {
propertyList.remove(devicePortProperty);
loadBalancer.setDevicePort(devicePortProperty.getValue());
} else {
String msg = LbLogUtil.getStringManager().getString(
"DevicePortNotFound", loadBalancer.getName());
Logger.getAnonymousLogger().log(Level.SEVERE, msg);
loadBalancer.setDevicePort("443");