Class MessageParameters
java.lang.Object
org.apache.flink.runtime.rest.messages.MessageParameters
- Direct Known Subclasses:
AbstractAggregatedMetricsParameters,CheckpointStatusMessageParameters,CheckpointTriggerMessageParameters,ClientCoordinationMessageParameters,ClusterDataSetDeleteStatusMessageParameters,ClusterDataSetDeleteTriggerMessageParameters,EmptyMessageParameters,FileMessageParameters,JobCancellationMessageParameters,JobClientHeartbeatParameters,JobManagerMetricsMessageParameters,JobManagerOperatorMetricsMessageParameters,JobMessageParameters,ProfilingFileMessageParameters,SavepointDisposalStatusMessageParameters,SavepointStatusMessageParameters,SavepointTriggerMessageParameters,TaskManagerMessageParameters
This class defines the path/query
MessageParameters that can be used for a request.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Collection<MessagePathParameter<?>>Returns the collection ofMessagePathParameterthat the request supports.abstract Collection<MessageQueryParameter<?>>Returns the collection ofMessageQueryParameterthat the request supports.final booleanReturns whether all mandatory parameters have been resolved.static StringresolveUrl(String genericUrl, MessageParameters parameters) Resolves the given URL (e.g "jobs/:jobid") using the given path/query parameters.
-
Constructor Details
-
MessageParameters
public MessageParameters()
-
-
Method Details
-
getPathParameters
Returns the collection ofMessagePathParameterthat the request supports. The collection should not be modifiable.- Returns:
- collection of all supported message path parameters
-
getQueryParameters
Returns the collection ofMessageQueryParameterthat 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
Resolves the given URL (e.g "jobs/:jobid") using the given path/query parameters.This method will fail with an
IllegalStateExceptionif any mandatory parameter was not resolved.Unresolved optional parameters will be ignored.
- Parameters:
genericUrl- URL to resolveparameters- message parameters parameters- Returns:
- resolved url, e.g "/jobs/1234?state=running"
- Throws:
IllegalStateException- if any mandatory parameter was not resolved
-