org.fossilec.odettej.service
Class CommandIdentifier

java.lang.Object
  extended by org.fossilec.odettej.service.CommandIdentifier

public final class CommandIdentifier
extends java.lang.Object

Odette FTP entities communicate by sending and receiving messages in Exchange Buffers. Each Exchange Buffer correspond to a command which is defined by the Command Identifier. The identifier is verified at the first octet of an Exchange Buffer that define the format of the remaing buffer.

The CommandIdentifier class provide type safe instances to distinguish every Exchange Buffer over all supported commands types.


Field Summary
static CommandIdentifier CD
          Change Direction
static CommandIdentifier CDT
          Set Credit
static CommandIdentifier DATA
          Data
static CommandIdentifier EERP
          End to End Response
static CommandIdentifier EFID
          End File
static CommandIdentifier EFNA
          End File Negative Answer
static CommandIdentifier EFPA
          End File Positive Answer
static CommandIdentifier ESID
          End Session
static CommandIdentifier RTR
          Ready To Receive
static CommandIdentifier SFID
          Start File
static CommandIdentifier SFNA
          Start File Negative Answer
static CommandIdentifier SFPA
          Start File Positive Answer
static CommandIdentifier SSID
          Start Session
static CommandIdentifier SSRM
          Start Session Ready Message
 
Method Summary
 java.lang.String getCode()
          Return the protocol representation of CommandIdentifier enum.
static CommandIdentifier parse(java.lang.String code)
          Convenient method for parsing the proper CommandIdentifier instance given a identifier character.
 java.lang.String toString()
           
static java.util.Collection values()
          Return a collection of the avaiable typed enumerations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SSRM

public static final CommandIdentifier SSRM
Start Session Ready Message


SSID

public static final CommandIdentifier SSID
Start Session


SFID

public static final CommandIdentifier SFID
Start File


SFPA

public static final CommandIdentifier SFPA
Start File Positive Answer


SFNA

public static final CommandIdentifier SFNA
Start File Negative Answer


DATA

public static final CommandIdentifier DATA
Data


CDT

public static final CommandIdentifier CDT
Set Credit


EFID

public static final CommandIdentifier EFID
End File


EFPA

public static final CommandIdentifier EFPA
End File Positive Answer


EFNA

public static final CommandIdentifier EFNA
End File Negative Answer


ESID

public static final CommandIdentifier ESID
End Session


CD

public static final CommandIdentifier CD
Change Direction


EERP

public static final CommandIdentifier EERP
End to End Response


RTR

public static final CommandIdentifier RTR
Ready To Receive

Method Detail

getCode

public java.lang.String getCode()
Return the protocol representation of CommandIdentifier enum.

Returns:
String corresponding protocol code.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

parse

public static CommandIdentifier parse(java.lang.String code)
                               throws OdetteFTPException
Convenient method for parsing the proper CommandIdentifier instance given a identifier character.

Parameters:
identifier - The command identifier being evaluated
Returns:
CommandIdentifier Instance that correspond to the parameter
Throws:
CommandNotRecognisedException - Command not recognised
OdetteFTPException

values

public static java.util.Collection values()
Return a collection of the avaiable typed enumerations.

Returns:


Copyright © 2005 ObjectWeb Consortium. All Rights Reserved.