org.ikasan.connector.basefiletransfer.outbound
Class BaseFileTransferConnectionImpl

java.lang.Object
  extended by org.ikasan.connector.base.outbound.EISConnectionImpl
      extended by org.ikasan.connector.basefiletransfer.outbound.BaseFileTransferConnectionImpl
All Implemented Interfaces:
javax.resource.cci.Connection, EISConnection

public abstract class BaseFileTransferConnectionImpl
extends EISConnectionImpl

A Base implementation for File transfer connections

Author:
Ikasan Development Team

Field Summary
 
Fields inherited from class org.ikasan.connector.base.outbound.EISConnectionImpl
managedConnection
 
Constructor Summary
BaseFileTransferConnectionImpl(javax.resource.spi.ManagedConnection mc)
          Constructor which takes ManagedConnection as a parameter
 
Method Summary
 void deliverInputStream(java.io.InputStream inputStream, java.lang.String fileName, java.lang.String outputDir, boolean overwrite, java.lang.String renameExtension, boolean checksumDelivered, boolean unzip)
          Deliver the InputStream TODO Add in the checksumDelivered feature
protected abstract  ExecutionOutput executeCommand(TransactionalResourceCommand deliveryCommand, ExecutionContext executionContext)
          Execute the command
 
Methods inherited from class org.ikasan.connector.base.outbound.EISConnectionImpl
close, createInteraction, getAutoCommit, getConnectionState, getLocalTransaction, getMetaData, getResultSetInfo, invalidate, setAutoCommit, setManager, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFileTransferConnectionImpl

public BaseFileTransferConnectionImpl(javax.resource.spi.ManagedConnection mc)
Constructor which takes ManagedConnection as a parameter

Parameters:
mc - The ManagedConnection
Method Detail

deliverInputStream

public void deliverInputStream(java.io.InputStream inputStream,
                               java.lang.String fileName,
                               java.lang.String outputDir,
                               boolean overwrite,
                               java.lang.String renameExtension,
                               boolean checksumDelivered,
                               boolean unzip)
                        throws javax.resource.ResourceException
Deliver the InputStream TODO Add in the checksumDelivered feature

Parameters:
inputStream - to deliver
fileName - The name of the file
outputDir - The output directory to deliver to
overwrite - Whether to overwrite or not
renameExtension - The extension for renaming the file
checksumDelivered - A flag to see if we check the checksum on delivery
unzip - flag
Throws:
javax.resource.ResourceException - - Exception from the JCA connector

executeCommand

protected abstract ExecutionOutput executeCommand(TransactionalResourceCommand deliveryCommand,
                                                  ExecutionContext executionContext)
                                           throws javax.resource.ResourceException
Execute the command

Parameters:
deliveryCommand - The command to execute
executionContext - The execution context
Returns:
The output of that Execution
Throws:
javax.resource.ResourceException - The Exception from the JCA connector


Copyright © 2007-2010 Ikasan. All Rights Reserved.