gw.setSocketBufferSize(gateway.getSocketBufferSize());
}
if (gateway.getQueue() != null) {
GatewayQueue queue = gateway.getQueue();
GatewayQueueAttributes queueAttributes = gw.getQueueAttributes();
if (queue.getAlertThreshold() != null) {
queueAttributes.setAlertThreshold(queue.getAlertThreshold());
}
if (queue.getEnableBatchConflation() != null) {
queueAttributes.setBatchConflation(queue.getEnableBatchConflation());
}
if (queue.getBatchSize() != null) {
queueAttributes.setBatchSize(queue.getBatchSize());
}
if (queue.getBatchTimeInterval() != null) {
queueAttributes.setBatchTimeInterval(queue.getBatchTimeInterval());
}
if (queue.getDiskStoreRef() != null) {
boolean persistent = (queue.getPersistent() == null) ? Boolean.TRUE : queue.getPersistent();
Assert.isTrue(persistent, "specifying a disk store requires persistent property to be true");
queueAttributes.setDiskStoreName(queue.getDiskStoreRef());
}
if (queue.getPersistent() != null) {
queueAttributes.setEnablePersistence(queue.getPersistent());
}
if (queue.getMaximumQueueMemory() != null) {
queueAttributes.setMaximumQueueMemory(queue.getMaximumQueueMemory());
}
}
}
}