Class VirtualHost
VirtualHost
is matched from one or more PartialURL
and contains a list of per-virtual-host
rules
. These rules are called after global rules for requests that
match the domains.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Inserts rules into the end of this virtual host.void
Inserts rules into the end of this virtual host.static SinglePartialURL
Generates the default partial URL for the given domain ashttps://${domain}
.A virtual host always has a canonical partial URL.Gets the unique domain name of this host.getRules()
Gets an unmodifiable copy of the rules applied to this virtual host.Gets an unmodifiable iterator to the rules.void
Inserts rules into the beginning of this virtual host.void
Inserts rules into the beginning of this virtual host.
-
Method Details
-
generateCanonicalPartialURL
Generates the default partial URL for the given domain ashttps://${domain}
.TODO: Should this be a
URL
to not allow it to be partial? -
getDomain
Gets the unique domain name of this host. A virtual host may have any number of hostnames associated with it viaPartialURL
, but has a single domain name.It is possible for a virtual host to exist without any associated
PartialURL
. In this case, links to it will use the canonicalPartialURL
, if present, but the host is not matched and served locally. -
getCanonicalPartialURL
A virtual host always has a canonical partial URL. This is used to generate URLs to the virtual host when there is no matchingenvironment
.This canonical partial URL may have
null
fields, which will be taken from the currentrequest
viaHttpServletRequestFieldSource
. -
getRules
Gets an unmodifiable copy of the rules applied to this virtual host. -
getRulesIterable
Gets an unmodifiable iterator to the rules.Implementation Note:
Is unmodifiable due to being implemented asCopyOnWriteArrayList.iterator()
. -
prepend
Inserts rules into the beginning of this virtual host. -
prepend
Inserts rules into the beginning of this virtual host. -
append
Inserts rules into the end of this virtual host. -
append
Inserts rules into the end of this virtual host.
-