org.neociclo.odetteftp.protocol.v14
Class CommandBuilderVer14

java.lang.Object
  extended by org.neociclo.odetteftp.protocol.CommandBuilder
      extended by org.neociclo.odetteftp.protocol.v13.CommandBuilderVer13
          extended by org.neociclo.odetteftp.protocol.v14.CommandBuilderVer14
Direct Known Subclasses:
CommandBuilderVer20

public class CommandBuilderVer14
extends CommandBuilderVer13

Version:
$Rev: 800 $ $Date: 2010-10-19 20:55:25 -0200 (Tue, 19 Oct 2010) $
Author:
Rafael Marins

Field Summary
static String DATE_STAMP_PATTERN
          String formatter pattern for converting a Date value to the Date stamp used on commands.
static String TIME_STAMP_PATTERN
          String formatter pattern for converting a Date value to the Time stamp used on commands.
 
Fields inherited from class org.neociclo.odetteftp.protocol.CommandBuilder
DEFAULT_PROTOCOL_CHARSET, ZERO
 
Constructor Summary
CommandBuilderVer14()
           
 
Method Summary
static CommandExchangeBuffer endToEndResponse(String dataSetName, Date dateTime, short ticker, String userData, String destination, String originator)
          Create the End to End Response command with given parameters.
static CommandExchangeBuffer negativeEndResponse(String dataSetName, Date dateTime, short ticker, String destination, String originator, String creator, NegativeResponseReason reason)
          Create the End to End Response command with given parameters.
static CommandExchangeBuffer startFile(String datasetName, Date dateTime, short ticker, String userData, String destination, String originator, RecordFormat recordFormat, int maxRecordSize, long fileSize, long restartOffset)
          Create the Start File command with given parameters.
The Start File command includes a count allowing the restart of an interrupted transmission to be negotiated.
static CommandExchangeBuffer startSession(String code, String pswd, int sdeb, TransferMode mode, boolean compression, boolean restart, boolean specialLogic, int credit, String userData)
          Create the Start Session command with given parameters.
 
Methods inherited from class org.neociclo.odetteftp.protocol.v13.CommandBuilderVer13
endFile, endFileNegativeAnswer, endFilePositiveAnswer, endSession, endToEndResponse, startFile, startFileNegativeAnswer, startFilePositiveAnswer, startSession
 
Methods inherited from class org.neociclo.odetteftp.protocol.CommandBuilder
changeDirection, isEmpty, readyMessage, readyToReceive, setCredit, yesNo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_STAMP_PATTERN

public static final String DATE_STAMP_PATTERN
String formatter pattern for converting a Date value to the Date stamp used on commands.

See Also:
SimpleDateFormat.SimpleDateFormat(java.lang.String), Constant Field Values

TIME_STAMP_PATTERN

public static final String TIME_STAMP_PATTERN
String formatter pattern for converting a Date value to the Time stamp used on commands.

See Also:
SimpleDateFormat.SimpleDateFormat(java.lang.String), Constant Field Values
Constructor Detail

CommandBuilderVer14

public CommandBuilderVer14()
Method Detail

endToEndResponse

public static CommandExchangeBuffer endToEndResponse(String dataSetName,
                                                     Date dateTime,
                                                     short ticker,
                                                     String userData,
                                                     String destination,
                                                     String originator)
Create the End to End Response command with given parameters.

Parameters:
dataSetName - Dataset Name of the Virtual File being transfered.
dateTime - Virtual File date and time indicating when the file was made available for transmission.
ticker -
userData - May be used by the ODETTE-FTP in any way.
destination - Identification code from the Originator of the Virtual File, which created (mapped) the data for transmission.
originator - Identification code of the Final Recipient of the Virtual File. This is the location that creates the EERP for the received file.
Returns:
The End to End Response command with the corresponding values.

negativeEndResponse

public static CommandExchangeBuffer negativeEndResponse(String dataSetName,
                                                        Date dateTime,
                                                        short ticker,
                                                        String destination,
                                                        String originator,
                                                        String creator,
                                                        NegativeResponseReason reason)
Create the End to End Response command with given parameters.

Parameters:
dataSetName - Dataset name of the Virtual File being transfered.
dateTime - Virtual File date and time indicating when the file was made available for transmission.
ticker -
destination - Identification code from the Originator of the Virtual File, which created (mapped) the data for transmission.
originator - Identification code of the Final Recipient of the Virtual File. This is the location that creates the EERP for the received file.
creator -
reason -
Returns:
The End to End Response command with the corresponding values.

startFile

public static CommandExchangeBuffer startFile(String datasetName,
                                              Date dateTime,
                                              short ticker,
                                              String userData,
                                              String destination,
                                              String originator,
                                              RecordFormat recordFormat,
                                              int maxRecordSize,
                                              long fileSize,
                                              long restartOffset)
Create the Start File command with given parameters.
The Start File command includes a count allowing the restart of an interrupted transmission to be negotiated. If restart facilities are not available the restart count must be set to zero. The sender will start with the lowest record count + 1.

Parameters:
datasetName - Dataset Name of the Virtual File being transferred assigned by bilateral agreement.
dateTime - Specific Date and Time assigned by the Virtual File's Originator indicating when the file was made available for transmission.
ticker -
userData - May be used by the ODETTE-FTP in any way. If unused it should be initialized to spaces. It is expected that a bilateral agreement exists as to the meaning of the data.
destination - The Identification Code for the final recipient of the Virtual File. This is the location that will look into the Virtual File content and perform mapping functions. It is also the location that creates the End to End Response (EERP) command for the received file.
originator - The Identification Code from the Originator of the Virtual File. It is the location that created (mapped) the data for transmission.
recordFormat - Virtual File format (Fixed, Variable, Unstructured, Text File). Used to calculate the restart position.
maxRecordSize - Length in octets of the longest logical record which may be transferred to a location. Only user data is included. If File format is 'T' or 'U' then this attribute must be set to '00000'
fileSize - File Size, 1K (1024 octets) blocks.
restartOffset - Restart position.
Returns:
The Start File command with the corresponding values.

startSession

public static CommandExchangeBuffer startSession(String code,
                                                 String pswd,
                                                 int sdeb,
                                                 TransferMode mode,
                                                 boolean compression,
                                                 boolean restart,
                                                 boolean specialLogic,
                                                 int credit,
                                                 String userData)
Create the Start Session command with given parameters. It belongs to the Start Session Phase, and is performed in both direction to negotiate capabilities and session wide parameters between locations.

Parameters:
code - Initiator's Identification Code which uniquely identifies the Initiator (sender) participating in the Odette FTP session.
pswd - Key to authenticate the sender. Assigned by bilateral agreement.
sdeb - The length, in octets, of the largest Exchange Buffer that can be accepted by the location.
compression - Compression indicator. true if the location can handle compressed data. Otherwise it should be false.
restart - Restart indication informing whether the location can handle the restart of a partially transmitted file.
specialLogic - Special logic indication.
credit - Credit.
userData - User Data.
sendReceive - Sender / Receiver capabilities:
Returns:
The Start Session command with the corresponding values.


ACCORD