Class ProtocolUtil


  • public class ProtocolUtil
    extends java.lang.Object
    A few general helper method to get the version and platform information to and from messages.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProtocolUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ApiPlatform fromKeyToApiPlatform​(int key)
      get the api platform given it's integer key value.
      static int getVersionFromProperties()
      gets and caches the current version from the version properties file
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProtocolUtil

        public ProtocolUtil()
    • Method Detail

      • getVersionFromProperties

        public static int getVersionFromProperties()
        gets and caches the current version from the version properties file
        Returns:
        the current version as major * 100 + minor
      • fromKeyToApiPlatform

        public static ApiPlatform fromKeyToApiPlatform​(int key)
        get the api platform given it's integer key value.
        Parameters:
        key - the platform key
        Returns:
        platform enum entry.