Class AS2Utils

java.lang.Object
org.apache.camel.component.as2.api.util.AS2Utils

public final class AS2Utils extends Object
Utility Methods used in AS2 Component
  • Field Details

  • Method Details

    • validateAS2Name

      public static void validateAS2Name(String name) throws InvalidAS2NameException
      Validates if the given name is a valid AS2 Name
      Parameters:
      name - - the name to validate.
      Throws:
      InvalidAS2NameException - - If name is invalid.
    • createMessageId

      public static String createMessageId(String fqdn)
      Generates a globally unique message ID which includes fqdn: a fully qualified domain name (FQDN)
      Parameters:
      fqdn - - the fully qualified domain name to use in message id.
      Returns:
      The generated message id.
    • isPrintableChar

      public static boolean isPrintableChar(char c)
      Determines if c is a printable character.
      Parameters:
      c - - the character to test
      Returns:
      true if c is a printable character; false otherwise.
    • printRequest

      public static String printRequest(org.apache.hc.core5.http.HttpRequest request) throws IOException
      Throws:
      IOException
    • printMessage

      public static String printMessage(org.apache.hc.core5.http.HttpMessage message) throws IOException
      Throws:
      IOException
    • printRequest

      public static void printRequest(PrintStream out, org.apache.hc.core5.http.HttpRequest request) throws IOException
      Prints the contents of request to given print stream.
      Parameters:
      out - - the stream printed to.
      request - - the request printed.
      Throws:
      IOException - - If failed to print request.
    • printMessage

      public static void printMessage(PrintStream out, org.apache.hc.core5.http.HttpMessage message) throws IOException
      Prints the contents of an Http Message to given print stream.
      Parameters:
      out - - the stream printed to.
      message - - the request printed.
      Throws:
      IOException - - If failed to print message.