public final class PatternsRequestCondition extends AbstractRequestCondition<PatternsRequestCondition>
コンストラクターと説明 |
---|
PatternsRequestCondition(ListSE<PathPattern> patterns) 指定された URL パターンで新しいインスタンスを作成します。 |
PatternsRequestCondition(PathPattern... patterns) 指定された URL パターンで新しいインスタンスを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
PatternsRequestCondition | combine(PatternsRequestCondition other) 次のように、現在のインスタンス("this" )と「その他」のインスタンスからの URL パターンを含む新しいインスタンスを返します。両方のインスタンスにパターンがある場合は、"this" のパターンを PathPattern.combine(PathPattern) を使用して「その他」のパターンと組み合わせます。 |
int | compareTo(PatternsRequestCondition other, ServerWebExchange exchange) 含まれている URL パターンに基づいて 2 つの条件を比較します。 |
protected CollectionSE<PathPattern> | getContent() リクエスト条件を構成する個別のアイテムを返します。 |
SetSE<StringSE> | getDirectPaths() パターンではないマッピングパスを返します。 |
PatternsRequestCondition | getMatchingCondition(ServerWebExchange exchange) パターンのいずれかが指定されたリクエストと一致するかどうかを確認し、一致するパターンを含むことが保証されているインスタンスをソートして返します。 |
SetSE<PathPattern> | getPatterns() |
protected StringSE | getToStringInfix() コンテンツの個別のアイテムを出力するときに使用する表記。 |
equals, hashCode, isEmpty, toString
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public PatternsRequestCondition(PathPattern... patterns)
patterns
- 0 個以上の URL パターン。0 の場合、条件はすべてのリクエストに一致します。public PatternsRequestCondition(ListSE<PathPattern> patterns)
public SetSE<PathPattern> getPatterns()
protected CollectionSE<PathPattern> getContent()
AbstractRequestCondition
たとえば、URL パターン、HTTP リクエストメソッド、パラメーター式など。
AbstractRequestCondition<PatternsRequestCondition>
の getContent
null
)protected StringSE getToStringInfix()
AbstractRequestCondition
たとえば、URL パターンの " || "
または param 式の " && "
。
public PatternsRequestCondition combine(PatternsRequestCondition other)
PathPattern.combine(PathPattern)
を使用して「その他」のパターンと組み合わせます。other
- 組み合わせる条件。@Nullable public PatternsRequestCondition getMatchingCondition(ServerWebExchange exchange)
exchange
- 現在の交換 null
。public int compareTo(PatternsRequestCondition other, ServerWebExchange exchange)
両方のインスタンスが getMatchingCondition(ServerWebExchange)
を介して取得され、リクエストに一致するパターンのみが含まれ、最も一致するものが上にソートされることを前提としています。