use of com.helger.as2lib.params.RandomParameters in project as2-lib by phax.
the class AS2Message method generateMessageID.
@Override
@Nonnull
@Nonempty
public String generateMessageID() {
final CompositeParameters aParams = new CompositeParameters(false).add("date", new DateParameters()).add("msg", new MessageParameters(this)).add("rand", new RandomParameters());
final String sIDFormat = partnership().getMessageIDFormat(DEFAULT_ID_FORMAT);
final StringBuilder aSB = new StringBuilder();
aSB.append('<');
try {
aSB.append(aParams.format(sIDFormat));
} catch (final AS2InvalidParameterException ex) {
// useless, but what to do?
aSB.append(sIDFormat);
}
aSB.append('>');
return aSB.toString();
}
Aggregations