Contact Free trial Login

Defining Parameters in a Message Source

Parameters are defined as fields of your Source class. All the features and annotations (such as @NullSafe, @ParameterGroup, @TypeResolver) are available when defining an operation, for example:

public class HttpListener extends Source<InputStream, HttpRequestAttributes> {

    private HttpListenerConfig config;

    @Optional(defaultValue = "/")
    private String path;

    private Integer port;

    * Comma separated list of allowed HTTP methods by this listener.
    @Placement(tab = Placement.ADVANCED_TAB)
    @Summary("Comma separated list of methods. Leave empty to allow all.")
    @Example("GET, POST")
    private String allowedMethods;

This is similar to how configs are defined, except that none of these parameters accept expressions. Using the @Expression annotation to support or require expression support will result in an error.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub