Enum Class SCMPVersion
- All Implemented Interfaces:
Serializable,Comparable<SCMPVersion>,Constable,IReversibleEnum<String,SCMPVersion>
9.9 (E.g. 2.4)
| |
| +-- version number
+-- release number
Release number designates the major release (design) of the protocol. It starts at 1 and is incremented by 1. New protocol is by definition not compatible with the old one. E.g. if the release number is not the same an error occurs.
Version number designates the minor improvements of the protocol. It starts at 0 and is incremented by 1. New versions may contain additional features and are compatible. E.g.
2.(x+1) is compatible with V2.(x) but not the other way round.
Handling of the SCMP Version in a network hierarchy works according to the following rules and restrictions. The components supporting a SCMP Version have to follow the top down
restrictions. This means the requester is able to connect to components supporting equal or higher protocol version. In other words server and SC on level zero have to support
equal or higher SCMP Version than connecting clients. Clients and Proxies may connect using older versions.
In the context of a session service request the server has to respond with protocol version given in the request. Protocol version is received from the client and nowhere
changes for the whole communication flow. In the context of a publish service the server has to publish messages with protocol version compatible to the clients version (lowest
version in field). For example the server supports SCMP Version 1.3 and connected clients version 1.2 the server has to publish with version 1.2. Otherwise clients are not able
to receive messages. Fault messages from the SC to the server may have version 1.2 even if SC and Server support 1.3. This happens because supported protocol version number of
the server is unknown for the SC. In conclusion components supporting an SCMP Version have to implement the matching rules and version logic properly in any case.
See the SC_0_SCMP_E.PDF for more details.
- Author:
- JTraber
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbyteGets the release number.static SCMPVersiongetSCMPVersionByByteArray(byte[] versionBuffer) Gets the sCMP version by byte array.getValue()Return the value/code of the enum constant.byteGets the version number.voidisSupported(byte[] buffer) Checks if is supported.Get theEnumconstant by looking up the code in the reverse enum maptoString()static SCMPVersionReturns the enum constant of this class with the specified name.static SCMPVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CURRENT
1.3, the current version. -
LOWEST
1.2, old version, correlates to lowest requester version in field. -
TEST
3.2, the version to make tests - DO NOT CHANGE ! -
UNDEFINED
The UNDEFINED SCMP Version.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isSupported
Checks if is supported.- Parameters:
buffer- the buffer containing the version number- Throws:
SCMPValidatorException- the SCMP validation exception
-
getSCMPVersionByByteArray
Gets the sCMP version by byte array.- Parameters:
versionBuffer- the version buffer- Returns:
- the sCMP version by byte array
-
getVersionNumber
public byte getVersionNumber()Gets the version number.- Returns:
- the version number
-
getReleaseNumber
public byte getReleaseNumber()Gets the release number.- Returns:
- the release number
-
getValue
Return the value/code of the enum constant.- Specified by:
getValuein interfaceIReversibleEnum<String,SCMPVersion> - Returns:
- value
-
reverse
Get theEnumconstant by looking up the code in the reverse enum map. *- Specified by:
reversein interfaceIReversibleEnum<String,SCMPVersion> - Parameters:
buffer- the code- Returns:
- V - The enum constant
-
toString
- Overrides:
toStringin classEnum<SCMPVersion>
-