}
protected void doInitialise() throws ManagedLifecycleException {
try {
// Configure the groovy script....
Binding binding = new Binding();
UncomposedMessageDeliveryAdapter deliveryAdapter = createDeliveryAdapter();
binding.setVariable("config", getConfig());
binding.setVariable("gateway", this);
binding.setVariable("listener", this);
if(deliveryAdapter != null) {
binding.setVariable("deliveryAdapter", deliveryAdapter);
}
script.setBinding(binding);
} catch (ConfigurationException e) {
throw new ManagedLifecycleException("Unable to construct message delivery adapter.", e);
}