org.springframework.mobile.device.switcher
Class AbstractSiteUrlFactory
java.lang.Object
org.springframework.mobile.device.switcher.AbstractSiteUrlFactory
- All Implemented Interfaces:
- SiteUrlFactory
- Direct Known Subclasses:
- AbstractSitePathUrlFactory, StandardSiteUrlFactory
public abstract class AbstractSiteUrlFactory
- extends java.lang.Object
- implements SiteUrlFactory
Abstract implementation of the SiteUrlFactory interface.
Doesn't mandate the strategy for constructing different site URLs;
simply implements common functionality.
- Author:
- Keith Donald, Scott Rossillo, Roy Clarkson
|
Method Summary |
protected java.lang.String |
createSiteUrlInternal(javax.servlet.http.HttpServletRequest request,
java.lang.String serverName,
java.lang.String path)
|
protected java.lang.String |
optionalPort(javax.servlet.http.HttpServletRequest request)
Returns the HTTP port specified on the given request if it's a non-standard port. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSiteUrlFactory
public AbstractSiteUrlFactory()
optionalPort
protected java.lang.String optionalPort(javax.servlet.http.HttpServletRequest request)
- Returns the HTTP port specified on the given request if it's a non-standard port.
The port is considered non-standard if it's not port 80 for insecure request and not
port 443 of secure requests.
- Parameters:
request - the HttpServletRequest to check for a non-standard port.
- Returns:
- the HTTP port specified on the given request if it's a non-standard port,
null otherwise
createSiteUrlInternal
protected java.lang.String createSiteUrlInternal(javax.servlet.http.HttpServletRequest request,
java.lang.String serverName,
java.lang.String path)