Sun Adapter for Batch/FTP

com.stc.eways.batchext
Interface LocalFileClient

All Superinterfaces:
com.stc.eways.common.eway.standalone.streaming.InputStreamAdapter, com.stc.eways.common.eway.standalone.streaming.OutputStreamAdapter
All Known Implementing Classes:
LocalFileClientImpl

public interface LocalFileClient
extends com.stc.eways.common.eway.standalone.streaming.InputStreamAdapter, com.stc.eways.common.eway.standalone.streaming.OutputStreamAdapter

This class represents the local file client functionality available to the user.


Method Summary
 void allowTransfer()
           
 void executePostCommandGet(LocalFileTransferNamesAndCommandsGet tnc)
           
 void executePostCommandPut(LocalFileTransferNamesAndCommandsPut tnc)
           
 void executePreCommandGet(LocalFileTransferNamesAndCommandsGet tnc)
           
 void executePreCommandPut(LocalFileTransferNamesAndCommandsPut tnc)
           
 void get()
          Performs an inbound transfer to the Payload field.
 void getIfExists()
          Same as get but if there is no file found matching the name pattern given in "Target Directory Name" and "Target File Name", just return siliently;
 com.stc.eways.common.eway.standalone.streaming.InputStreamAdapter getInputStreamAdapter()
          Gets an InputStreamAdapter which can be used to perform inbound streaming transfers with this LocalFileClient.
 com.stc.eways.common.eway.standalone.streaming.OutputStreamAdapter getOutputStreamAdapter()
          Gets an OutputStreamAdapter which can be used to perform outbound streaming transfers with this LocalFileClient.
 byte[] getPayload()
          Gets the content of the Payload field.
 TransferNamesAndCommands getResolvedNamesToGet()
          Obtains a TransferNamesAndCommands instance, which can be used to get access to the resolved names and commands for the current inbound transfer.
 TransferNamesAndCommands getResolvedNamesToPut()
          Obtains a TransferNamesAndCommands instance, which can be used to get access to the resolved names and commands for the current outbound transfer.
 boolean getResumeReadingInProgress()
          Indicates whether there is a 'Resume Reading' operation in progres.
 void getTargetDirExists()
          Same as get but verify whether target directory is accessible
 void initialize(LocalFileETD etd)
           
 void put()
          Performs an outbound transfer from the Payload field.
 boolean reset()
          Resets the LocalFileClient, so it can be used in subsequent transfers.
 void setPayload(byte[] newPayload)
          Sets the content of the Payload field.
 void undoPreCommandGet(LocalFileTransferNamesAndCommandsGet tnc)
           
 void undoPreCommandPut(LocalFileTransferNamesAndCommandsPut tnc)
           
 void undoTransferGet(LocalFileTransferNamesAndCommandsGet tnc)
           
 void undoTransferPut(LocalFileTransferNamesAndCommandsPut tnc)
           
 
Methods inherited from interface com.stc.eways.common.eway.standalone.streaming.InputStreamAdapter
releaseInputStream, requestInputStream
 
Methods inherited from interface com.stc.eways.common.eway.standalone.streaming.OutputStreamAdapter
releaseOutputStream, requestOutputStream
 

Method Detail

initialize

void initialize(LocalFileETD etd)

reset

boolean reset()
Resets the LocalFileClient, so it can be used in subsequent transfers.

Returns:
true on success, otherwise false.

allowTransfer

void allowTransfer()

getResolvedNamesToGet

TransferNamesAndCommands getResolvedNamesToGet()
                                               throws LocalFileException
Obtains a TransferNamesAndCommands instance, which can be used to get access to the resolved names and commands for the current inbound transfer.

Returns:
TransferNamesAndCommands instance.
Throws:
LocalFileException - If anything goes wrong. LocalFileException.getNestedException() can be used to retrieve the original exception that caused the failure, if any.

getResolvedNamesToPut

TransferNamesAndCommands getResolvedNamesToPut()
                                               throws LocalFileException
Obtains a TransferNamesAndCommands instance, which can be used to get access to the resolved names and commands for the current outbound transfer.

Returns:
TransferNamesAndCommands instance.
Throws:
LocalFileException - If anything goes wrong. LocalFileException.getNestedException() can be used to retrieve the original exception that caused the failure, if any.

getPayload

byte[] getPayload()
Gets the content of the Payload field.

Returns:
The Payload content.

setPayload

void setPayload(byte[] newPayload)
Sets the content of the Payload field.

Parameters:
newPayload - The new Payload content.

getInputStreamAdapter

com.stc.eways.common.eway.standalone.streaming.InputStreamAdapter getInputStreamAdapter()
Gets an InputStreamAdapter which can be used to perform inbound streaming transfers with this LocalFileClient.

Returns:
The InputStreamAdapter.

getOutputStreamAdapter

com.stc.eways.common.eway.standalone.streaming.OutputStreamAdapter getOutputStreamAdapter()
Gets an OutputStreamAdapter which can be used to perform outbound streaming transfers with this LocalFileClient.

Returns:
The OutputStreamAdapter.

get

void get()
         throws LocalFileException
Performs an inbound transfer to the Payload field.

Throws:
LocalFileException - If anything goes wrong. LocalFileException.getNestedException() can be used to retrieve the original exception that caused the failure, if any.

getIfExists

void getIfExists()
                 throws LocalFileException
Same as get but if there is no file found matching the name pattern given in "Target Directory Name" and "Target File Name", just return siliently;

Throws:
FtpFileException - If some error occurs.
LocalFileException

getTargetDirExists

void getTargetDirExists()
                        throws LocalFileException
Same as get but verify whether target directory is accessible

Throws:
LocalFileException

put

void put()
         throws LocalFileException
Performs an outbound transfer from the Payload field.

Throws:
LocalFileException - If anything goes wrong. LocalFileException.getNestedException() can be used to retrieve the original exception that caused the failure, if any.

getResumeReadingInProgress

boolean getResumeReadingInProgress()
Indicates whether there is a 'Resume Reading' operation in progres.

Returns:
true if 'Resume Reading' state was recorded in the preceeding inbound transfer, otherwise false.

executePreCommandGet

void executePreCommandGet(LocalFileTransferNamesAndCommandsGet tnc)
                          throws LocalFileException,
                                 BatchException
Throws:
LocalFileException
BatchException

undoPreCommandGet

void undoPreCommandGet(LocalFileTransferNamesAndCommandsGet tnc)
                       throws LocalFileException,
                              BatchException
Throws:
LocalFileException
BatchException

executePostCommandGet

void executePostCommandGet(LocalFileTransferNamesAndCommandsGet tnc)
                           throws LocalFileException,
                                  BatchException
Throws:
LocalFileException
BatchException

undoTransferGet

void undoTransferGet(LocalFileTransferNamesAndCommandsGet tnc)
                     throws LocalFileException,
                            BatchException
Throws:
LocalFileException
BatchException

executePreCommandPut

void executePreCommandPut(LocalFileTransferNamesAndCommandsPut tnc)
                          throws LocalFileException,
                                 BatchException
Throws:
LocalFileException
BatchException

undoPreCommandPut

void undoPreCommandPut(LocalFileTransferNamesAndCommandsPut tnc)
                       throws LocalFileException,
                              BatchException
Throws:
LocalFileException
BatchException

executePostCommandPut

void executePostCommandPut(LocalFileTransferNamesAndCommandsPut tnc)
                           throws LocalFileException,
                                  BatchException
Throws:
LocalFileException
BatchException

undoTransferPut

void undoTransferPut(LocalFileTransferNamesAndCommandsPut tnc)
                     throws LocalFileException,
                            BatchException
Throws:
LocalFileException
BatchException

Sun Adapter for Batch/FTP