|
Sun Adapter for Batch/FTP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FtpFileClient
This interface represents a node in the ETD structure. You can extend it to provide your own implementation, if desired. This class is used for ETD implementation and e*Way Connection delegation.
Field Summary | |
---|---|
static java.lang.String |
ENCODING_BIG5
|
static java.lang.String |
ENCODING_DEFAULT
|
static java.lang.String |
ENCODING_EUC_JP
|
static java.lang.String |
ENCODING_GBK
|
static java.lang.String |
ENCODING_JIS
|
static java.lang.String |
ENCODING_SJIS
|
static java.lang.String |
TC_GET
|
static java.lang.String |
TC_PUT
|
Method Summary | |
---|---|
void |
allowTransfer()
Allow transfers in XA mode. |
void |
cleanupPostTransferGet(TransferNamesAndCommands tncg)
Cleans up any failures during Post Transfer Command for "get". |
void |
cleanupPostTransferPut(TransferNamesAndCommands tncp)
Cleans up any failures during Post Transfer Command for "put". |
void |
cleanupPreTransferGet(TransferNamesAndCommands tncg)
Cleans up any failures during Pre Transfer Command for "get". |
void |
cleanupPreTransferPut(TransferNamesAndCommands tncp)
Cleans up any failures during Pre Transfer Command for "put". |
void |
cleanupRawCommands(TransferNamesAndCommands tncr)
Cleans up any failures during pre/post ftp raw commands. |
void |
cleanupTransferGet(TransferNamesAndCommands tncg)
Cleans up any failures during ftp Transfer "get". |
void |
cleanupTransferPut(TransferNamesAndCommands tncp)
Cleans up any failures during ftp Transfer "put". |
void |
close()
Does the FTP log-out and disconnects. |
void |
connect()
Performs the FTP connection, log-in and switch modes, and so on. |
void |
connect(java.lang.String encoding)
Performs the FTP connection, log-in and switch modes, and so on. |
void |
disconnect()
Does the FTP log-out and disconnects. |
void |
doPostTransferGet(TransferNamesAndCommands tncg)
Performs Post Transfer Command for FTP get operation. |
void |
doPostTransferPut(TransferNamesAndCommands tncp)
Performs Post Transfer Command for FTP put operation. |
void |
doPreTransferGet(TransferNamesAndCommands tncg)
Performs Pre Transfer Command for FTP get operation. |
void |
doPreTransferPut(TransferNamesAndCommands tncp)
Performs Pre Transfer Command for FTP put operation. |
void |
doRawCommands(java.lang.String commands)
Performs FTP pre and post transfer raw commands, for example: SITE RECFM=FB;SITE LRECL=50;SITE BLOCKSIZE=32750;SITE TRACKS;SITE PRI=5;SITE SEC=5 NOTE: The commands are separated by a semicolon (;), and only FTP raw commands are expected. |
void |
doTransferGet(TransferNamesAndCommands tncg)
Performs the real FTP get transfer. |
void |
doTransferPut(TransferNamesAndCommands tncp)
Performs the real FTP put transfer. |
void |
get()
Retrieves a file from the remote FTP server. |
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; Invoking of the method can result in : a) throw Exception ( SoapFault if it is BPEL ), the caller is notified an error b) getIfExists() (readIfExists() for BPEL) successful, payload is NULL, target file does not exists; c) getIfExists() (readIfExists() for BPEL) successful, payload is NOT NULL, target file detected and content is read, if the content is 0 length, this lead to a byte[] of 0 length as payload; |
byte[] |
getPayload()
Retrieves the data payload. |
TransferNamesAndCommands |
getResolvedNamesForGet()
Resolves names from patterns for the FTP get operation. |
TransferNamesAndCommands |
getResolvedNamesForPut()
Resolves names from patterns for the FTP put operation. |
java.util.Properties |
getUserProperties()
Retrieves user-defined properties. |
void |
initialConfigValues(java.util.Properties props)
Initializes the e*Way Connection's configuration properties from user-specified properties. |
void |
initialize(FtpETD etd)
Initializes the FTP ETD object. |
boolean |
isConnected()
Verifies that the e*Way Connection to the external system is still available. |
boolean |
isOpen()
Verifies that the e*Way Connection to the external system is still available. |
boolean |
isXA()
Determines whether an e*Way Connection is in the XA mode. |
void |
open()
Performs the FTP connection, log-in and switch modes, and so on. |
void |
open(java.lang.String encoding)
Performs the FTP connection, log-in and switch modes, and so on. |
void |
put()
Stores a remote FTP file. |
void |
releaseResources()
Releases the e*Way Connection's system resources but does not close the connection to the external system. |
boolean |
reset()
Resets the data content of an FtpFileClient. |
void |
restoreConfigValues()
Restores all the ETD's configuration properties from the related e*Way Connection. |
void |
setInputStreamAdapter(com.stc.eways.common.eway.standalone.streaming.InputStreamAdapter isa)
Used to request data streams from another ETD. |
void |
setOutputStreamAdapter(com.stc.eways.common.eway.standalone.streaming.OutputStreamAdapter osa)
Used to request data streams from another ETD. |
void |
setPayload(byte[] newPayload)
Sets the data payload. |
void |
terminate()
Terminates the FtpFileClient object instance. |
void |
undoPostTransferGet(TransferNamesAndCommands tncg)
Undoes Post Transfer for FTP get operation. |
void |
undoPostTransferPut(TransferNamesAndCommands tncp)
Undoes Post Transfer for FTP put operation. |
void |
undoPreTransferGet(TransferNamesAndCommands tncg)
Undoes Pre Transfer for FTP get operation. |
void |
undoPreTransferPut(TransferNamesAndCommands tncp)
Undoes Pre Transfer for FTP put operation. |
void |
undoRawCommands(TransferNamesAndCommands tncr)
Undo pre/post ftp raw commands. |
void |
undoTransferGet(TransferNamesAndCommands tncg)
Undoes ftp get transfer. |
void |
undoTransferPut(TransferNamesAndCommands tncp)
Undoes ftp put transfer. |
Field Detail |
---|
static final java.lang.String TC_GET
static final java.lang.String TC_PUT
static final java.lang.String ENCODING_DEFAULT
static final java.lang.String ENCODING_SJIS
static final java.lang.String ENCODING_EUC_JP
static final java.lang.String ENCODING_GBK
static final java.lang.String ENCODING_BIG5
static final java.lang.String ENCODING_JIS
Method Detail |
---|
void initialize(FtpETD etd) throws FtpFileException
etd
- The FtpETD instance.
FtpFileException
- If some error occurs.void close()
void initialConfigValues(java.util.Properties props) throws FtpFileException
props
- The specified properties.
FtpFileException
- If some error occurs.boolean isOpen()
true
if the connection is still open and available;
false
otherwise.void open() throws FtpFileException
FtpFileException
- If some error occurs.void open(java.lang.String encoding) throws FtpFileException
encoding
- The encoding for the server.
FtpFileException
- If some error occurs.void allowTransfer()
boolean reset() throws FtpFileException
false
if the FtpFileClient doesn't have a meaningful implementation of
reset()
; so do a new
of the FtpFileClient instead.
Otherwise, return true
if the reset() will clear the data content
of the FtpFileClient.
FtpFileException
- If some error occurs.void restoreConfigValues() throws FtpFileException
FtpFileException
- If some error occurs.void terminate() throws FtpFileException
FtpFileException
- If some error occurs.boolean isXA()
byte[] getPayload()
The data payload is a blob (byte array) used to store the raw content of a file.
java.util.Properties getUserProperties()
This method is an advanced setting and is part of the FTP ETD's user-extensibility features.
The properties are retrieved from the user properties file.
void releaseResources()
void setPayload(byte[] newPayload)
The data payload is a blob (byte array) used to store the raw content of a file.
newPayload
- The data payload.void connect() throws FtpFileException
FtpFileException
- If some error occurs.void connect(java.lang.String encoding) throws FtpFileException
encoding
- The encoding for the server.
FtpFileException
- If some error occurs.void disconnect()
boolean isConnected()
true
If the connection is still open and available;
false
if otherwise.void setInputStreamAdapter(com.stc.eways.common.eway.standalone.streaming.InputStreamAdapter isa)
isa
- InputStreamAdapter object.void setOutputStreamAdapter(com.stc.eways.common.eway.standalone.streaming.OutputStreamAdapter osa)
osa
- OutputStreamAdapter object.TransferNamesAndCommands getResolvedNamesForGet() throws FtpFileException
FtpFileException
- If some error occurs.TransferNamesAndCommands getResolvedNamesForPut() throws FtpFileException
FtpFileException
- If some error occurs.void put() throws FtpFileException
FtpFileException
- If some error occurs.void cleanupPostTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void cleanupPostTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void cleanupPreTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void cleanupPreTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void cleanupRawCommands(TransferNamesAndCommands tncr) throws FtpFileException
tncr
- An instance of TransferNamesAndCommands class.
FtpFileException
- If some error occurs.void cleanupTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void cleanupTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void doPostTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void doPostTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void doPreTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void doPreTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void doRawCommands(java.lang.String commands) throws FtpFileException
commands
- The FTP raw command set.commands
- The raw command set.
FtpFileException
- If some error occurs.void doTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void doTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void undoPostTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void undoPostTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void undoPreTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void undoPreTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void undoRawCommands(TransferNamesAndCommands tncr) throws FtpFileException
tncr
- An instance of TransferNamesAndCommands.
FtpFileException
- If some error occurs.void undoTransferGet(TransferNamesAndCommands tncg) throws java.lang.Exception
tncg
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void undoTransferPut(TransferNamesAndCommands tncp) throws java.lang.Exception
tncp
- An instance of TransferNamesAndCommands class.
java.lang.Exception
- If some error occurs.void get() throws FtpFileException
FtpFileException
- If some error occurs.void getIfExists() throws FtpFileException
FtpFileException
- If some error occurs.
|
Sun Adapter for Batch/FTP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |