fchan.resolve();
if (fchan.isSendable())
{
Component component = new Component("FileSender." + channel.getName(), channel.getType().getSender(), Component.CONTEXT);
Component connectionFactory = new Component("FileSenderConnectionFactory." + channel.getName(), FileConnectionFactory.class, Component.SINGLETON);
Component factoryFactory = new Component("FileSenderConnectionFactoryFactory." + channel.getName(), FileSenderConnectionFactoryFactory.class, Component.NEW);
factoryFactory.addPrimitivePropertyInitializer("channel", channel);
connectionFactory.setFactory(factoryFactory, "create");
component.addComponentPropertyInitializer("connectionFactory", connectionFactory);
component.addPrimitivePropertyInitializer("channel", channel);
fchan.setSender(component);
}
if (fchan.isReceivable())
{
Component component = new Component("FileReceiver." + channel.getName(), channel.getType().getReceiver(), Component.SINGLETON);
loader.addSingletonFixup(component);
fchan.setReceiver(component);
component.setMetadata(loader.getMetadata());
component.addPrimitivePropertyInitializer("channel", channel);
final PrimitivePropertyInitializer initializer = component.addPrimitivePropertyInitializer("contextComponent", null);
loader.addComponentFixup(new XMLMetadataHelper.ContextFixup(loader.getHelper())
{
public void fixup()
{