Skip to content
Snippets Groups Projects
Commit f116747b authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-6891 KOP-2735 javadoc: Explain xta client config

parent b2b94c00
No related branches found
No related tags found
No related merge requests found
...@@ -26,50 +26,127 @@ import lombok.ToString; ...@@ -26,50 +26,127 @@ import lombok.ToString;
@ToString @ToString
public class XtaClientConfig { public class XtaClientConfig {
/**
* The reader client identifiers which are used to fetch messages.
*
* <p>
* Usually, in order to use the client identifiers, an according client certificate needs to be configured.
* </p>
*/
@Builder.Default @Builder.Default
private final List<@Valid XtaIdentifier> clientIdentifiers = emptyList(); private final List<@Valid XtaIdentifier> clientIdentifiers = emptyList();
/** /**
* avoid downloading unsupported messages * This predicate may be used to filter listed messages before they are fetched. If null, all messages are fetched.
*
* <p>
* Note that, usually, all messages for a client identifier should be read, i.e., fetched and processed. However, it may be useful to filter
* messages before fetching them. For instance, to avoid downloading messages which would inevitably lead to a runtime exception during
* processing.
* </p>
*/ */
@Builder.Default @Builder.Default
private final Predicate<XtaMessageMetaData> isMessageSupported = null; private final Predicate<XtaMessageMetaData> isMessageSupported = null;
/**
* The URL of the management service.
*
* For instance: {@code https://my-xta-server.de/MB_XTA-WS/XTA210managementPort.svc}
*/
@NotBlank @NotBlank
private final String managementServiceUrl; private final String managementServiceUrl;
/**
* The URL of the send service.
*
* For instance: {@code https://my-xta-server.de/MB_XTA-WS/XTA210sendPort.svc}
*/
@NotBlank @NotBlank
private final String sendServiceUrl; private final String sendServiceUrl;
/**
* The URL of the message box service.
*
* For instance: {@code https://my-xta-server.de/MB_XTA-WS/XTA210msgBoxPort.svc}
*/
@NotBlank @NotBlank
private final String msgBoxServiceUrl; private final String msgBoxServiceUrl;
/**
* The number of message metadata items to request at a time. The default value is 50.
*
* <p>
* Note that reducing this limit may result in more listing calls. Furthermore, listing all messages may not be possible if the number of
* unprocessed messages reaches this limit, see {@linkplain de.ozgcloud.xta.client.XtaClient#fetchMessages fetchMessages}.
* </p>
*/
@Positive @Positive
@Builder.Default @Builder.Default
private final int maxListItems = 50; private final int maxListItems = 50;
/**
* The keystore used to authenticate this client to the server.
*
* <p>
* The keystore should contain a private key and a certificate chain which the server trusts.
* </p>
*/
@Valid @Valid
@Builder.Default @Builder.Default
private final KeyStore clientCertKeystore = null; private final KeyStore clientCertKeystore = null;
/**
* The truststore to authenticate the server to the client.
*
* <p>
* The truststore should contain a root certificate or a certificate chain of the server. May be null if the server certificate is trusted by the JVM.
* </p>
*/
@Valid @Valid
@Builder.Default @Builder.Default
private final KeyStore trustStore = null; private final KeyStore trustStore = null;
/**
* Whether to validate the XTA SOAP schema of the messages. Default is true.
*
* <p>
* This option is intended for testing purposes and turing it off is not recommended.
* </p>
*/
@Builder.Default @Builder.Default
private final boolean schemaValidation = true; private final boolean schemaValidation = true;
/**
* Whether to log SOAP requests. Default is false.
*/
@Builder.Default @Builder.Default
private final boolean logSoapRequests = false; private final boolean logSoapRequests = false;
/**
* Whether to log SOAP responses. Default is false.
*/
@Builder.Default @Builder.Default
private final boolean logSoapResponses = false; private final boolean logSoapResponses = false;
/**
* Configuration for a keystore. Either for a client certificate or a trust store.
*/
@RequiredArgsConstructor @RequiredArgsConstructor
@Getter @Getter
@Builder @Builder
@ToString @ToString
public static class KeyStore { public static class KeyStore {
/**
* File content of the keystore file.
*/
@NotNull @NotNull
private final byte[] content; private final byte[] content;
/**
* The type of the keystore. For instance, "PKCS12" or "JKS".
*/
@NotBlank @NotBlank
private final String type; private final String type;
/**
* The password of the keystore.
*/
@NotNull @NotNull
private final char[] password; private final char[] password;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment