Modifier and Type | Method and Description |
---|---|
static String |
getHostIdentifier(javax.servlet.ServletRequest request,
Environment env)
Deprecated.
|
static PathInfo |
getPathInfo(Environment env,
Site site,
String servletPath)
Creates and returns a
PathInfo -object based upon the given parameters. |
static Site |
getSite(Environment env,
javax.servlet.ServletRequest servletRequest)
Retrieves a
Site by its name. |
static Site |
getSiteByHost(Environment env,
String host)
Deprecated.
use {@link #getSiteByName(Environment, String)
|
static Site |
getSiteByName(Environment env,
String name)
Retrieves a
Site by its name. |
static String |
getSiteName(Environment env,
javax.servlet.ServletRequest request)
Retrieves a
Site 's name for the given ServletRequest , using the given Environment to
retrieve the VHostMode . |
static Set<String> |
getSiteNames(Environment env)
|
static Site |
waitForSite(Environment env,
String name)
Retrieves a
Site by its name, waiting up to Platform.Property#MAX_WAIT_TIME milliseconds until
it's state is SiteState#STARTED . |
public static Site getSite(Environment env, javax.servlet.ServletRequest servletRequest)
Site
by its name.env
- the current Environment
servletRequest
- the current ServletRequest
Site
, if anygetSiteName(Environment, ServletRequest)
@Deprecated public static Site getSiteByHost(Environment env, String host)
Site
by its host.env
- the current Environment
host
- the host of the Site
Site
, if anySite.getHost()
public static Site getSiteByName(Environment env, String name)
Site
by its name.env
- the current Environment
name
- the name of the Site
Site
, if anyNameable.getName()
public static Site waitForSite(Environment env, String name)
Site
by its name, waiting up to Platform.Property#MAX_WAIT_TIME
milliseconds until
it's state is SiteState#STARTED
.env
- the current Environment
name
- the name of the Site
Site
, if anygetSiteByName(Environment, String)
,
Site.hasState(SiteState...)
public static Set<String> getSiteNames(Environment env)
env
- the current Environment
Site
namespublic static PathInfo getPathInfo(Environment env, Site site, String servletPath)
PathInfo
-object based upon the given parameters.env
- the current Environment
site
- the current Site
servletPath
- the current servlet-pathPathInfo
-object@Deprecated public static String getHostIdentifier(javax.servlet.ServletRequest request, Environment env)
getSiteName(Environment, ServletRequest)
public static String getSiteName(Environment env, javax.servlet.ServletRequest request)
Site
's name for the given ServletRequest
, using the given Environment
to
retrieve the VHostMode
.env
- an Environment
request
- the ServletRequest
VHostMode.IP_BASED
is used (see ServletRequest.getLocalAddr()
)
This header has to be added by the webserver of choice (usually Apache
httpd), in case a Site
needs to be accessible from a domain that is different from the one
configured by Site.getDomain()
.
ServletRequest.getServerName()
)
Copyright © 2011–2021 aiticon GmbH. All rights reserved.