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/queryMessageParameter
s 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 ofMessagePathParameter
that the request supports.abstract Collection<MessageQueryParameter<?>>
getQueryParameters()
Returns the collection ofMessageQueryParameter
that the request supports.boolean
isResolved()
Returns whether all mandatory parameters have been resolved.static String
resolveUrl(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 ofMessagePathParameter
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 ofMessageQueryParameter
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 resolveparameters
- message parameters parameters- Returns:
- resolved url, e.g "/jobs/1234?state=running"
- Throws:
IllegalStateException
- if any mandatory parameter was not resolved
-
-