public final class CmsSiteMatcher
extends java.lang.Object
implements java.lang.Cloneable
限定符和类型 | 字段和说明 |
---|---|
static CmsSiteMatcher |
DEFAULT_MATCHER
Default matcher that always matches all other Site matchers.
|
构造器和说明 |
---|
CmsSiteMatcher(java.lang.String serverString)
Construct a new site matcher from a String which should be in default URL notation.
|
CmsSiteMatcher(java.lang.String serverString,
long timeOffset)
Construct a new site matcher from a String which should be in default URL notation.
|
CmsSiteMatcher(java.lang.String serverProtocol,
java.lang.String serverName,
int serverPort)
Constructs a new site matcher object.
|
CmsSiteMatcher(java.lang.String serverProtocol,
java.lang.String serverName,
int serverPort,
long timeOffset)
Constructs a new site matcher object.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
clone()
Returns a clone of this Objects instance.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getServerName()
Returns the hostname (e.g. localhost) which is required to access this site.
|
int |
getServerPort()
Returns the port (e.g. 80) which is required to access this site.
|
java.lang.String |
getServerProtocol()
Returns the protocol (e.g.
|
long |
getTimeOffset()
Returns the time Offset.
|
java.lang.String |
getUrl()
Returns the url of this site matcher.
|
int |
hashCode() |
protected void |
setServerName(java.lang.String serverName)
Sets the hostname (e.g. localhost) which is required to access this site.
|
protected void |
setServerPort(int serverPort)
Sets the port (e.g. 80) which is required to access this site.
|
protected void |
setServerProtocol(java.lang.String serverProtocol)
Sets the protocol (e.g.
|
protected void |
setTimeOffset(long timeOffset)
Sets the time Offset in seconds.
|
java.lang.String |
toString() |
public static final CmsSiteMatcher DEFAULT_MATCHER
public CmsSiteMatcher(java.lang.String serverString)
If no port is provided, the default port 80 or 443 will be used for http or https respectively. If no protocol is provided, the default protocol "http" will be used.
serverString
- the String, e.g. http://localhost:8080public CmsSiteMatcher(java.lang.String serverString, long timeOffset)
If no port is provided, the default port 80 or 443 will be used for http or https respectively. If no protocol is provided, the default protocol "http" will be used.
serverString
- the String, e.g. http://localhost:8080timeOffset
- the time offsetpublic CmsSiteMatcher(java.lang.String serverProtocol, java.lang.String serverName, int serverPort)
serverProtocol
- to protocol required to access this siteserverName
- the server URL prefix to which this site is mappedserverPort
- the port required to access this sitepublic CmsSiteMatcher(java.lang.String serverProtocol, java.lang.String serverName, int serverPort, long timeOffset)
serverProtocol
- to protocol required to access this siteserverName
- the server URL prefix to which this site is mappedserverPort
- the port required to access this sitetimeOffset
- the time offsetpublic java.lang.Object clone()
clone
在类中 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String getServerName()
public int getServerPort()
public java.lang.String getServerProtocol()
public long getTimeOffset()
public java.lang.String getUrl()
public int hashCode()
hashCode
在类中 java.lang.Object
Object.hashCode()
public java.lang.String toString()
toString
在类中 java.lang.Object
Object.toString()
protected void setServerName(java.lang.String serverName)
Setting the hostname to "*" is a wildcard that matches all hostnames
serverName
- the hostname (e.g. localhost) which is required to access this siteprotected void setServerPort(int serverPort)
Setting the port to 0 (zero) is a wildcard that matches all ports
serverPort
- the port (e.g. 80) which is required to access this siteprotected void setServerProtocol(java.lang.String serverProtocol)
Setting the protocol to "*" is a wildcard that matches all protocols.
serverProtocol
- the protocol (e.g. "http", "https") which is required to access this siteprotected void setTimeOffset(long timeOffset)
timeOffset
- the time Offset to set