Package org.apache.activemq.openwire
Class OpenWireUtil
java.lang.Object
org.apache.activemq.openwire.OpenWireUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertJmsPackage(String className) This method can be used to convert from javax -> jakarta or vice versa depending on the version used by the clientstatic voidvalidateBufferSize(OpenWireFormat wireFormat, int size) Verify that the buffer size that will be allocated will not push the total allocated size of this frame above the expected frame size.static voidvalidateIsThrowable(Class<?> clazz) Verify that the provided class extendsThrowableand throw anIllegalArgumentExceptionif it does not.
-
Constructor Details
-
OpenWireUtil
public OpenWireUtil()
-
-
Method Details
-
validateIsThrowable
Verify that the provided class extendsThrowableand throw anIllegalArgumentExceptionif it does not.- Parameters:
clazz-
-
validateBufferSize
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 OpenWireFormatsize- buffer size to verify- Throws:
IOException- If size is larger than currentFrameSize or maxFrameSize
-
convertJmsPackage
This method can be used to convert from javax -> jakarta or vice versa depending on the version used by the client- Parameters:
className-- Returns:
-