Class BrowsingLocationImpl

java.lang.Object
dev.webfx.platform.windowlocation.spi.impl.PathLocationImpl
dev.webfx.platform.windowlocation.spi.impl.BrowsingLocationImpl
All Implemented Interfaces:
BrowsingLocation, HostLocation, PathLocation

public class BrowsingLocationImpl extends PathLocationImpl implements BrowsingLocation
Author:
Bruno Salmon
  • Constructor Details

  • Method Details

    • getProtocol

      public String getProtocol()
      Description copied from interface: HostLocation
      Ex: https in https://developer.mozilla.org/en-US/search?q=URL#search-results-close-container
      Specified by:
      getProtocol in interface HostLocation
      Returns:
      A String containing the protocol scheme of the URL.
    • getHostname

      public String getHostname()
      Description copied from interface: HostLocation
      Ex: developer.mozilla.org in https://developer.mozilla.org:443/en-US/search?q=URL#search-results-close-container
      Specified by:
      getHostname in interface HostLocation
      Returns:
      A String containing the domain of the URL.
    • getPort

      public String getPort()
      Description copied from interface: HostLocation
      Ex: 443 in https://developer.mozilla.org:443/en-US/search?q=URL#search-results-close-container
      Specified by:
      getPort in interface HostLocation
      Returns:
      A String containing the port number of the URL (or blank if not specified)
    • fromHref

      public static BrowsingLocationImpl fromHref(String href)
    • fromHref

      public static BrowsingLocationImpl fromHref(String href, String protocol)