Class AS2Utils
java.lang.Object
org.apache.camel.component.as2.api.util.AS2Utils
Utility Methods used in AS2 Component
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateMessageId(String fqdn) Generates a globally unique message ID which includesfqdn: a fully qualified domain name (FQDN)static booleanisPrintableChar(char c) Determines ifcis a printable character.static voidprintMessage(PrintStream out, org.apache.hc.core5.http.HttpMessage message) Prints the contents of an Http Message to given print stream.static StringprintMessage(org.apache.hc.core5.http.HttpMessage message) static voidprintRequest(PrintStream out, org.apache.hc.core5.http.HttpRequest request) Prints the contents of request to given print stream.static StringprintRequest(org.apache.hc.core5.http.HttpRequest request) static voidvalidateAS2Name(String name) Validates if the givennameis a valid AS2 Name
-
Field Details
-
DQUOTE
- See Also:
-
BACKSLASH
- See Also:
-
AS2_TEXT_CHAR_SET
- See Also:
-
AS2_QUOTED_TEXT_CHAR_SET
- See Also:
-
AS2_QUOTED_PAIR
- See Also:
-
AS2_QUOTED_NAME
- See Also:
-
AS2_ATOMIC_NAME
- See Also:
-
AS2_NAME
- See Also:
-
AS_NAME_PATTERN
-
-
Method Details
-
validateAS2Name
Validates if the givennameis a valid AS2 Name- Parameters:
name- - the name to validate.- Throws:
InvalidAS2NameException- - Ifnameis invalid.
-
createMessageId
Generates a globally unique message ID which includesfqdn: 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 ifcis a printable character.- Parameters:
c- - the character to test- Returns:
trueifcis a printable character;falseotherwise.
-
printRequest
- Throws:
IOException
-
printMessage
- 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.
-