public final class AS2Utils extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
AS_NAME_PATTERN |
static String |
AS2_ATOMIC_NAME |
static String |
AS2_NAME |
static String |
AS2_QUOTED_NAME |
static String |
AS2_QUOTED_PAIR |
static String |
AS2_QUOTED_TEXT_CHAR_SET |
static String |
AS2_TEXT_CHAR_SET |
static String |
BACKSLASH |
static String |
DQUOTE |
Modifier and Type | Method and Description |
---|---|
static String |
createMessageId(String fqdn)
Generates a globally unique message ID which includes
fqdn : a fully qualified domain name (FQDN) |
static boolean |
isPrintableChar(char c)
Determines if
c is a printable character. |
static String |
printMessage(org.apache.http.HttpMessage message) |
static void |
printMessage(PrintStream out,
org.apache.http.HttpMessage message)
Prints the contents of an Http Message to given print stream.
|
static String |
printRequest(org.apache.http.HttpRequest request) |
static void |
printRequest(PrintStream out,
org.apache.http.HttpRequest request)
Prints the contents of request to given print stream.
|
static void |
validateAS2Name(String name)
Validates if the given
name is a valid AS2 Name |
public static final String DQUOTE
public static final String BACKSLASH
public static final String AS2_TEXT_CHAR_SET
public static final String AS2_QUOTED_TEXT_CHAR_SET
public static final String AS2_QUOTED_PAIR
public static final String AS2_QUOTED_NAME
public static final String AS2_ATOMIC_NAME
public static final String AS2_NAME
public static final Pattern AS_NAME_PATTERN
public static void validateAS2Name(String name) throws InvalidAS2NameException
name
is a valid AS2 Namename
- - the name to validate.InvalidAS2NameException
- - If name
is invalid.public static String createMessageId(String fqdn)
fqdn
: a fully qualified domain name (FQDN)fqdn
- - the fully qualified domain name to use in message id.public static boolean isPrintableChar(char c)
c
is a printable character.c
- - the character to testtrue
if c
is a printable character; false
otherwise.public static String printRequest(org.apache.http.HttpRequest request) throws IOException
IOException
public static String printMessage(org.apache.http.HttpMessage message) throws IOException
IOException
public static void printRequest(PrintStream out, org.apache.http.HttpRequest request) throws IOException
out
- - the stream printed to.request
- - the request printed.IOException
- - If failed to print request.public static void printMessage(PrintStream out, org.apache.http.HttpMessage message) throws IOException
out
- - the stream printed to.message
- - the request printed.IOException
- - If failed to print message.Apache Camel