org.ikasan.connector.basefiletransfer.outbound
Interface BaseFileTransferConnection

All Superinterfaces:
javax.resource.cci.Connection, EISConnection

public interface BaseFileTransferConnection
extends EISConnection

An interface for File Transfer based connections

Author:
Ikasan Development Team

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)
          Delivers the content of this InputStream using a File Transfer client
 void deliverPayload(Payload payload, java.lang.String outputDir, java.util.Map<java.lang.String,java.lang.String> outputTargets, boolean overwrite, java.lang.String renameExtension, boolean checksumDelivered, boolean unzip, boolean cleanup)
          Delivers the content of this Payload using a File Transfer client
 Payload getDiscoveredFile(java.lang.String sourceDir, java.lang.String filenamePattern, boolean renameOnSuccess, java.lang.String renameOnSuccessExtension, boolean moveOnSuccess, java.lang.String moveOnSuccessNewPath, boolean chunking, int chunkSize, boolean checksum, long minAge, boolean destructive, boolean filterDuplicates, boolean filterOnFilename, boolean filterOnLastModifedDate, boolean chronological)
          Discovers any new file on a remote system using a File Transfer client and returns the first one that it finds
 TransactionalCommandConnection getManagedConnection()
          Get the managed connection
 void housekeep(int maxRows, int ageOfFiles)
          Housekeeping the file transfer based connectors
 void setManagedConnection(TransactionalCommandConnection managedConnection)
          Set the managed connection
 
Methods inherited from interface org.ikasan.connector.base.outbound.EISConnection
close, getConnectionState, invalidate, validate
 
Methods inherited from interface javax.resource.cci.Connection
createInteraction, getLocalTransaction, getMetaData, getResultSetInfo
 

Method Detail

setManagedConnection

void setManagedConnection(TransactionalCommandConnection managedConnection)
Set the managed connection

Parameters:
managedConnection - -

getManagedConnection

TransactionalCommandConnection getManagedConnection()
Get the managed connection

Returns:
Base File Transfer Managed Connection

deliverPayload

void deliverPayload(Payload payload,
                    java.lang.String outputDir,
                    java.util.Map<java.lang.String,java.lang.String> outputTargets,
                    boolean overwrite,
                    java.lang.String renameExtension,
                    boolean checksumDelivered,
                    boolean unzip,
                    boolean cleanup)
                    throws javax.resource.ResourceException
Delivers the content of this Payload using a File Transfer client

Parameters:
payload - Payload either containing, or refering to the file content
outputDir - dir path on remote system to deliver the file or files
outputTargets - map of output subdirectories for file delivery keyed by regular expression matches on the delivered file name
overwrite - overwrite any existing files of the same name(s)
renameExtension - temporary extension to use whilst delivering single file
checksumDelivered - if true, attempt to reload the delivered file to compare the checksum value
unzip - if true, attempt to unzip the payload
cleanup - if true, cleans up any chunked data
Throws:
javax.resource.ResourceException - -

deliverInputStream

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
Delivers the content of this InputStream using a File Transfer client

Parameters:
inputStream - InputStream containing the file content
fileName - name of destination file
outputDir - dir path on remote system to deliver the file or files
overwrite - overwrite any existing files of the same name(s)
renameExtension - temporary extension to use whilst delivering single file
checksumDelivered - if true, attempt to reload the delivered file to compare the checksum value
unzip - if true, attempt to unzip the payload
Throws:
javax.resource.ResourceException - -

getDiscoveredFile

Payload getDiscoveredFile(java.lang.String sourceDir,
                          java.lang.String filenamePattern,
                          boolean renameOnSuccess,
                          java.lang.String renameOnSuccessExtension,
                          boolean moveOnSuccess,
                          java.lang.String moveOnSuccessNewPath,
                          boolean chunking,
                          int chunkSize,
                          boolean checksum,
                          long minAge,
                          boolean destructive,
                          boolean filterDuplicates,
                          boolean filterOnFilename,
                          boolean filterOnLastModifedDate,
                          boolean chronological)
                          throws javax.resource.ResourceException
Discovers any new file on a remote system using a File Transfer client and returns the first one that it finds

Parameters:
sourceDir - directory to get files from
filenamePattern - files to look for
renameOnSuccess - renaming flag
renameOnSuccessExtension - extension used if renaming
moveOnSuccess - moving flag
moveOnSuccessNewPath - new path used if moving
chunking - flag
chunkSize - size of file chunks
checksum - - checksum retrieval
minAge - min age of file to match in seconds
destructive - - Whether or not we destroy the file after successfully picking it up
filterDuplicates - - Whether we filter out duplicates or not
filterOnFilename - filter out files based on their name
filterOnLastModifedDate - filter out files based on last modified
chronological - retrieve files on a chronological basis
Returns:
Payload containing the file as content
Throws:
javax.resource.ResourceException - -

housekeep

void housekeep(int maxRows,
               int ageOfFiles)
               throws javax.resource.ResourceException
Housekeeping the file transfer based connectors

Parameters:
maxRows - Max number of rows the housekeeper can work with at a time
ageOfFiles - How old the entries should be (in days)
Throws:
javax.resource.ResourceException - Exception thrown by the Connector


Copyright © 2007-2010 Ikasan. All Rights Reserved.