org.neociclo.odetteftp.protocol.v20
Class CommandBuilderVer20
java.lang.Object
org.neociclo.odetteftp.protocol.CommandBuilder
org.neociclo.odetteftp.protocol.v13.CommandBuilderVer13
org.neociclo.odetteftp.protocol.v14.CommandBuilderVer14
org.neociclo.odetteftp.protocol.v20.CommandBuilderVer20
public class CommandBuilderVer20
- extends CommandBuilderVer14
- Version:
- $Rev: 800 $ $Date: 2010-10-19 20:55:25 -0200 (Tue, 19 Oct 2010) $
- Author:
- Rafael Marins
Method Summary |
static CommandExchangeBuffer |
authenticationChallenge(byte[] encodedChallenge)
|
static CommandExchangeBuffer |
authenticationChallengeResponse(byte[] challenge)
|
static CommandExchangeBuffer |
endFile(long recordCount,
long unitCount)
|
static CommandExchangeBuffer |
endFileNegativeAnswer(AnswerReason reason,
String reasonText)
|
static CommandExchangeBuffer |
endSession(EndSessionReason reason,
String reasonText)
|
static CommandExchangeBuffer |
endToEndResponse(String dsn,
Date dateTime,
short ticker,
String userData,
String destination,
String originator,
byte[] fileHash,
byte[] signature)
|
static String |
formatDate(Date dateTime)
|
static String |
formatTime(Date dateTime)
|
static CommandExchangeBuffer |
negativeEndResponse(String dataSetName,
Date dateTime,
short ticker,
String destination,
String originator,
String creator,
NegativeResponseReason reason,
String reasonText,
byte[] fileHash,
byte[] signature)
|
static CommandExchangeBuffer |
securityChangeDirection()
|
static CommandExchangeBuffer |
startFile(String dsn,
Date dateTime,
short ticker,
String userData,
String destination,
String originator,
RecordFormat recordFormat,
int recordSize,
long fileSize,
long originalFileSize,
long offset,
SecurityLevel sec,
CipherSuite cipherSuite,
FileCompression compressionAlgorithm,
FileEnveloping envelopingFormat,
boolean signedAck,
String fileDescription)
|
static CommandExchangeBuffer |
startFileNegativeAnswer(AnswerReason reason,
String reasonText,
boolean retry)
Create the Start File Negative Answer command containing the the reason
why transmission can not proced.
This retry parameter is used to advise the Speaker if it
should retry at a latter point in time due to a temporary condition at
the Listener site, such as a lack of storage space. |
static CommandExchangeBuffer |
startFilePositiveAnswer(long answerCount)
Create the Start File Positive Answer command. |
static CommandExchangeBuffer |
startSession(String code,
String pswd,
int sdeb,
TransferMode mode,
boolean compression,
boolean restart,
boolean specialLogic,
int credit,
boolean authentication,
String userData)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
MAX_FILE_DESCRIPTION_LENGTH
public static final int MAX_FILE_DESCRIPTION_LENGTH
- See Also:
- Constant Field Values
MAX_REASON_TEXT_LENGTH
public static final int MAX_REASON_TEXT_LENGTH
- See Also:
- Constant Field Values
CommandBuilderVer20
public CommandBuilderVer20()
startSession
public static CommandExchangeBuffer startSession(String code,
String pswd,
int sdeb,
TransferMode mode,
boolean compression,
boolean restart,
boolean specialLogic,
int credit,
boolean authentication,
String userData)
endSession
public static CommandExchangeBuffer endSession(EndSessionReason reason,
String reasonText)
startFile
public static CommandExchangeBuffer startFile(String dsn,
Date dateTime,
short ticker,
String userData,
String destination,
String originator,
RecordFormat recordFormat,
int recordSize,
long fileSize,
long originalFileSize,
long offset,
SecurityLevel sec,
CipherSuite cipherSuite,
FileCompression compressionAlgorithm,
FileEnveloping envelopingFormat,
boolean signedAck,
String fileDescription)
formatTime
public static String formatTime(Date dateTime)
formatDate
public static String formatDate(Date dateTime)
securityChangeDirection
public static CommandExchangeBuffer securityChangeDirection()
authenticationChallengeResponse
public static CommandExchangeBuffer authenticationChallengeResponse(byte[] challenge)
authenticationChallenge
public static CommandExchangeBuffer authenticationChallenge(byte[] encodedChallenge)
endToEndResponse
public static CommandExchangeBuffer endToEndResponse(String dsn,
Date dateTime,
short ticker,
String userData,
String destination,
String originator,
byte[] fileHash,
byte[] signature)
negativeEndResponse
public static CommandExchangeBuffer negativeEndResponse(String dataSetName,
Date dateTime,
short ticker,
String destination,
String originator,
String creator,
NegativeResponseReason reason,
String reasonText,
byte[] fileHash,
byte[] signature)
endFile
public static CommandExchangeBuffer endFile(long recordCount,
long unitCount)
endFileNegativeAnswer
public static CommandExchangeBuffer endFileNegativeAnswer(AnswerReason reason,
String reasonText)
startFilePositiveAnswer
public static CommandExchangeBuffer startFilePositiveAnswer(long answerCount)
- Create the Start File Positive Answer command. The only parameter
indicate which position the Listener agree to restart the receive of a
previous Virtual File.
- Parameters:
answerCount
- int
lower or equal to restart count specified by
the Speaker in the Start File (SFID) command. If restart
facilities are not avaiable, a count of zero must be
specified.
- Returns:
- The Start File Positive Answer command with the corresponding
values.
- Throws:
OdetteFtpException
startFileNegativeAnswer
public static CommandExchangeBuffer startFileNegativeAnswer(AnswerReason reason,
String reasonText,
boolean retry)
- Create the Start File Negative Answer command containing the the reason
why transmission can not proced.
This retry
parameter is used to advise the Speaker if it
should retry at a latter point in time due to a temporary condition at
the Listener site, such as a lack of storage space. It should be used in
conjunction with the Answer Reason code.
- Parameters:
reason
- Answer Reason.reasonText
- TODOretry
- true
if the transmission may be retried latter,
or false
to don't retry again.
- Returns:
- The Start File Negative Answer command with the corresponding
values.
- Throws:
OdetteFtpException
ACCORD