Class DiameterParser

    • Constructor Detail

      • DiameterParser

        public DiameterParser()
    • Method Detail

      • canFrameMessage

        public static boolean canFrameMessage​(io.snice.buffer.Buffer buffer)
        For stream based protocols, we may not get all the data at the same time and as such, we need to wait for more to arrive. This method simply checks if we have enough data in the buffer to fully frame the DiameterMessage.
        Parameters:
        buffer -
        Returns:
      • couldBeDiameterMessage

        public static boolean couldBeDiameterMessage​(io.snice.buffer.ReadableBuffer buffer)
                                              throws IOException
        Convenience method for checking if this could indeed by a DiameterMessage. Use this when you just want to check and not handle the DiameterParseException that would be thrown as a result of this not being a diameter message.

        TODO: may actually need a more specific ensure exception because right now, you don't konw if it "blew" up because it is not a diameter message or because there is a "real" ensure exception.

        Parameters:
        buffer -
        Returns:
        Throws:
        IOException