public abstract class MatchRule extends Object
| Modifier and Type | Field and Description |
|---|---|
static MatchRule |
ALL
The root rule which matches all URIs.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(MatchRule other)
Determine whether this rule is equal to another.
|
boolean |
equals(Object other)
Determine whether this rule is equal to another object.
|
String |
getMatchAbstractType()
Get the abstract type that this rule matches, or
null if this rule does not match by abstract type. |
String |
getMatchAbstractTypeAuthority()
Get the abstract type authority that this rule matches, or
null if this rule does not match by abstract type authority. |
String |
getMatchHost()
Get the host name that this rule matches, or
null if this rule does not match by host. |
org.wildfly.common.net.CidrAddress |
getMatchNetwork()
Get the network that this rule matches, or
null if this rule does not match by network. |
String |
getMatchPath()
Get the path name that this rule matches, or
null if this rule does not match by path. |
int |
getMatchPort()
Get the port number that this rule matches, or 0 if this rule does not match by port.
|
String |
getMatchProtocol()
Get the protocol (scheme) that this rule matches, or
null if this rule does not match by protocol. |
String |
getMatchUrnName()
Get the URN name that this rule matches, or
null if this rule does not match by URN. |
String |
getMatchUser()
Get the URI user info that this rule matches, or
null if this rule only matches empty URI user info. |
abstract int |
hashCode()
Get the hash code of this rule.
|
boolean |
isHostMatched()
Determine whether this rule matches based on host name.
|
boolean |
isNetworkMatched()
Determine whether this rule matches based on network.
|
boolean |
isPathMatched()
Determine whether this rule matches based on path name.
|
boolean |
isPortMatched()
Determine whether this rule matches based on port.
|
boolean |
isProtocolMatched()
Determine whether this rule matches based on URI protocol (scheme).
|
boolean |
isTypeAuthorityMatched()
Determine whether this rule matches based on abstract type.
|
boolean |
isTypeMatched()
Determine whether this rule matches based on abstract type.
|
boolean |
isUrnNameMatched()
Determine whether this rule matches based on URN name.
|
boolean |
isUserMatched()
Determine whether this rule matches based on non-empty URI user info.
|
MatchRule |
matchAbstractType(String typeName,
String authorityName)
Create a new rule which is the same as this rule, but also matches the given abstract type and type authority.
|
MatchRule |
matchAddress(InetAddress inetAddress)
Create a new rule which is the same as this rule, but also matches the given Internet address.
|
MatchRule |
matchAnyUser()
Create a new rule which is the same as this rule, but matches URIs with or without user info.
|
boolean |
matches(URI uri)
Determine if this rule matches the given URI.
|
boolean |
matches(URI uri,
String abstractType,
String abstractTypeAuthority)
Determine if this rule matches the given URI, and type.
|
MatchRule |
matchHost(String hostSpec)
Create a new rule which is the same as this rule, but also matches the given host name.
|
MatchRule |
matchLocalSecurityDomain(String name)
Create a new rule which is the same as this rule, but also matches the given security domain.
|
MatchRule |
matchNetwork(org.wildfly.common.net.CidrAddress cidrAddress)
Create a new rule which is the same as this rule, but also matches the given Internet network address.
|
MatchRule |
matchNoUser()
Create a new rule which is the same as this rule, but only matches URIs with no user info.
|
MatchRule |
matchPath(String pathSpec)
Create a new rule which is the same as this rule, but also matches the given path name.
|
MatchRule |
matchPort(int port)
Create a new rule which is the same as this rule, but also matches the given port number.
|
MatchRule |
matchProtocol(String protoName)
Create a new rule which is the same as this rule, but also matches the given protocol (scheme) name.
|
MatchRule |
matchUrnName(String name)
Create a new rule which is the same as this rule, but also matches the given URN name.
|
MatchRule |
matchUser(String userSpec)
Create a new rule which is the same as this rule, but also matches the given URI user info.
|
String |
toString()
Get the string representation of this rule.
|
public static final MatchRule ALL
public final boolean equals(Object other)
public final boolean equals(MatchRule other)
other - the other objecttrue if they are equal, false otherwisepublic abstract int hashCode()
public final boolean matches(URI uri)
uri - the URI to testtrue if the rule matches, false otherwisepublic boolean matches(URI uri, String abstractType, String abstractTypeAuthority)
uri - the URI to testabstractType - the abstract type of the connection (may be null)abstractTypeAuthority - the authority name of the abstract type (may be null)true if the rule matches, false otherwisepublic boolean isProtocolMatched()
true if the rule matches based on URI protocol, false otherwisepublic String getMatchProtocol()
null if this rule does not match by protocol.null if there is nonepublic boolean isTypeMatched()
true if the rule matches based on type, false otherwisepublic boolean isTypeAuthorityMatched()
true if the rule matches based on type, false otherwisepublic String getMatchAbstractType()
null if this rule does not match by abstract type.null if there is nonepublic String getMatchAbstractTypeAuthority()
null if this rule does not match by abstract type authority.null if there is nonepublic final MatchRule matchProtocol(String protoName)
protoName - the protocol name to matchpublic final MatchRule matchAbstractType(String typeName, String authorityName)
typeName - the type to matchauthorityName - the type authority name to matchpublic boolean isHostMatched()
true if the rule matches based on host name, false otherwisepublic String getMatchHost()
null if this rule does not match by host.null if there is nonepublic boolean isNetworkMatched()
true if the rule matches based on network, false otherwisepublic org.wildfly.common.net.CidrAddress getMatchNetwork()
null if this rule does not match by network.null if there is nonepublic final MatchRule matchHost(String hostSpec)
hostSpec - the host name to matchpublic final MatchRule matchAddress(InetAddress inetAddress)
inetAddress - the address to matchpublic final MatchRule matchNetwork(org.wildfly.common.net.CidrAddress cidrAddress)
cidrAddress - the network to matchpublic boolean isPathMatched()
true if the rule matches based on path name, false otherwisepublic String getMatchPath()
null if this rule does not match by path.null if there is nonepublic final MatchRule matchPath(String pathSpec)
pathSpec - the path name to matchpublic boolean isPortMatched()
true if the rule matches based on port, false otherwisepublic int getMatchPort()
public final MatchRule matchPort(int port)
port - the port to matchpublic boolean isUserMatched()
true if the rule matches based on non-empty user info, false otherwisepublic String getMatchUser()
null if this rule only matches empty URI user info.null if there is nonepublic final MatchRule matchUser(String userSpec)
userSpec - the user info to matchpublic final MatchRule matchNoUser()
public final MatchRule matchAnyUser()
public boolean isUrnNameMatched()
true if the rule matches based on URN name, false otherwisepublic String getMatchUrnName()
null if this rule does not match by URN.null if there is nonepublic final MatchRule matchUrnName(String name)
name - the URN name to matchpublic final MatchRule matchLocalSecurityDomain(String name)
name - the security domain name to matchCopyright © 2018 JBoss by Red Hat. All rights reserved.