java.lang.Object
com.aoapps.net.partialurl.URLFieldSource
- All Implemented Interfaces:
- FieldSource
Obtains fields for 
PartialURL from a URL.
 Implementation Note:
 This implementation is not thread safe due to results caching.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGets the context path for this URL, only ending in a slash (/) when isthe root context.getHost()Gets the IP address or hostname for this URL.getPath()Gets the path for this URL ornullwhen the path does not exist or is empty.getPort()Gets the port number for this URL.Gets the scheme (such as https/http/other) for this URL.
- 
Constructor Details- 
URLFieldSourceCreates a field source for the given URL.
 
- 
- 
Method Details- 
getSchemeGets the scheme (such as https/http/other) for this URL.- Specified by:
- getSchemein interface- FieldSource
- See Also:
 
- 
getHostGets the IP address or hostname for this URL.- Specified by:
- getHostin interface- FieldSource
- Throws:
- MalformedURLException- When unable to obtain the host or the obtained host is invalid
- See Also:
 
- 
getPortGets the port number for this URL.Implementation Note: 
 The implementation assumesProtocol.TCP.- Specified by:
- getPortin interface- FieldSource
- Throws:
- MalformedURLException- When unable to obtain the port or the obtained port is invalid
- See Also:
 
- 
getContextPathGets the context path for this URL, only ending in a slash (/) when isthe root context.Implementation Note: 
 This always returnsPath.ROOT.- Specified by:
- getContextPathin interface- FieldSource
- See Also:
 
- 
getPathGets the path for this URL ornullwhen the path does not exist or is empty.- Specified by:
- getPathin interface- FieldSource
- Throws:
- MalformedURLException- When unable to obtain the path or the obtained path is invalid
- See Also:
 
 
- 

