Class MessageParameters

    • Constructor Detail

      • MessageParameters

        public MessageParameters()
    • Method Detail

      • getPathParameters

        public abstract Collection<MessagePathParameter<?>> getPathParameters()
        Returns the collection of MessagePathParameter that the request supports. The collection should not be modifiable.
        Returns:
        collection of all supported message path parameters
      • getQueryParameters

        public abstract Collection<MessageQueryParameter<?>> getQueryParameters()
        Returns the collection of MessageQueryParameter that the request supports. The collection should not be modifiable.
        Returns:
        collection of all supported message query parameters
      • isResolved

        public final boolean isResolved()
        Returns whether all mandatory parameters have been resolved.
        Returns:
        true, if all mandatory parameters have been resolved, false otherwise
      • resolveUrl

        public static String resolveUrl​(String genericUrl,
                                        MessageParameters parameters)
        Resolves the given URL (e.g "jobs/:jobid") using the given path/query parameters.

        This method will fail with an IllegalStateException if any mandatory parameter was not resolved.

        Unresolved optional parameters will be ignored.

        Parameters:
        genericUrl - URL to resolve
        parameters - message parameters parameters
        Returns:
        resolved url, e.g "/jobs/1234?state=running"
        Throws:
        IllegalStateException - if any mandatory parameter was not resolved