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
public abstract class MessageParameters extends Object
This class defines the path/queryMessageParameters that can be used for a request.
-
-
Constructor Summary
Constructors Constructor Description MessageParameters()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Collection<MessagePathParameter<?>>getPathParameters()Returns the collection ofMessagePathParameterthat the request supports.abstract Collection<MessageQueryParameter<?>>getQueryParameters()Returns the collection ofMessageQueryParameterthat the request supports.booleanisResolved()Returns 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.
-
-
-
Method Detail
-
getPathParameters
public abstract Collection<MessagePathParameter<?>> getPathParameters()
Returns the collection ofMessagePathParameterthat 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 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
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
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
-
-