Class OpenWireUtil


  • public class OpenWireUtil
    extends Object
    • Constructor Detail

      • OpenWireUtil

        public OpenWireUtil()
    • Method Detail

      • validateIsThrowable

        public static void validateIsThrowable​(Class<?> clazz)
        Verify that the provided class extends Throwable and throw an IllegalArgumentException if it does not.
        Parameters:
        clazz -
      • validateBufferSize

        public static void validateBufferSize​(OpenWireFormat wireFormat,
                                              int size)
                                       throws IOException
        Verify that the buffer size that will be allocated will not push the total allocated size of this frame above the expected frame size. This is an estimate as the current size is only tracked when calls to this method are made and is primarily intended to prevent large arrays from being created due to an invalid size. Also verify the size against configured max frame size. This check is a sanity check in case of corrupt packets contain invalid size values.
        Parameters:
        wireFormat - configured OpenWireFormat
        size - buffer size to verify
        Throws:
        IOException - If size is larger than currentFrameSize or maxFrameSize
      • convertJmsPackage

        public static String convertJmsPackage​(String className)
        This method can be used to convert from javax -> jakarta or vice versa depending on the version used by the client
        Parameters:
        className -
        Returns: