- All Superinterfaces:
org.refcodes.mixin.CredentialsAccessor,org.refcodes.mixin.Dumpable,FragmentAccessor,HostAccessor,org.refcodes.mixin.IdentityAccessor,IpAddressAccessor,org.refcodes.mixin.PathAccessor,org.refcodes.mixin.PortAccessor,QueryFieldsAccessor,SchemeAccessor,org.refcodes.mixin.SecretAccessor
- All Known Subinterfaces:
Url.UrlBuilder
- All Known Implementing Classes:
UrlBuilderImpl,UrlImpl
public interface Url extends org.refcodes.mixin.Dumpable, SchemeAccessor, HostAccessor, IpAddressAccessor, org.refcodes.mixin.PortAccessor, org.refcodes.mixin.PathAccessor, QueryFieldsAccessor, FragmentAccessor, org.refcodes.mixin.CredentialsAccessor
An URL looks something like this:
"scheme://[identity[:secret]@]host[:port][/path][?query][#fragment] In
contrast to the
java.net URL, this URL also supports
"relative" locators with neither a scheme nor a host declaration. If the
relative locator starts with a "/" slash, then we assume not having a host
being provided: "/path?query#fragment" When it does *not* start with a "/"
slash, then we assume that the first element being the host:
"[identity[:secret]@]host[:port]/path[?query][#fragment]"-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceUrl.UrlBuilderNested classes/interfaces inherited from interface org.refcodes.mixin.CredentialsAccessor
org.refcodes.mixin.CredentialsAccessor.CredentialsBuilder<B extends org.refcodes.mixin.CredentialsAccessor.CredentialsBuilder<B>>, org.refcodes.mixin.CredentialsAccessor.CredentialsMutator, org.refcodes.mixin.CredentialsAccessor.CredentialsPropertyNested classes/interfaces inherited from interface org.refcodes.web.FragmentAccessor
FragmentAccessor.FragmentBuilder<B extends FragmentAccessor.FragmentBuilder<?>>, FragmentAccessor.FragmentMutator, FragmentAccessor.FragmentPropertyNested classes/interfaces inherited from interface org.refcodes.web.HostAccessor
HostAccessor.HostBuilder<B extends HostAccessor.HostBuilder<?>>, HostAccessor.HostMutator, HostAccessor.HostPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.IdentityAccessor
org.refcodes.mixin.IdentityAccessor.IdentityBuilder<B extends org.refcodes.mixin.IdentityAccessor.IdentityBuilder<B>>, org.refcodes.mixin.IdentityAccessor.IdentityMutator, org.refcodes.mixin.IdentityAccessor.IdentityPropertyNested classes/interfaces inherited from interface org.refcodes.web.IpAddressAccessor
IpAddressAccessor.IpAddressBuilder<B extends IpAddressAccessor.IpAddressBuilder<B>>, IpAddressAccessor.IpAddressMutator, IpAddressAccessor.IpAddressPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.PathAccessor
org.refcodes.mixin.PathAccessor.PathBuilder<B extends org.refcodes.mixin.PathAccessor.PathBuilder<?>>, org.refcodes.mixin.PathAccessor.PathMutator, org.refcodes.mixin.PathAccessor.PathPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.PortAccessor
org.refcodes.mixin.PortAccessor.PortBuilder<B extends org.refcodes.mixin.PortAccessor.PortBuilder<B>>, org.refcodes.mixin.PortAccessor.PortMutator, org.refcodes.mixin.PortAccessor.PortPropertyNested classes/interfaces inherited from interface org.refcodes.web.QueryFieldsAccessor
QueryFieldsAccessor.QueryFieldsBuilder<B extends QueryFieldsAccessor.QueryFieldsBuilder<?>>, QueryFieldsAccessor.QueryFieldsMutator, QueryFieldsAccessor.QueryFieldsPropertyNested classes/interfaces inherited from interface org.refcodes.web.SchemeAccessor
SchemeAccessor.SchemeBuilder<B extends SchemeAccessor.SchemeBuilder<B>>, SchemeAccessor.SchemeMutator, SchemeAccessor.SchemePropertyNested classes/interfaces inherited from interface org.refcodes.mixin.SecretAccessor
org.refcodes.mixin.SecretAccessor.SecretBuilder<B extends org.refcodes.mixin.SecretAccessor.SecretBuilder<B>>, org.refcodes.mixin.SecretAccessor.SecretMutator, org.refcodes.mixin.SecretAccessor.SecretProperty -
Method Summary
Modifier and Type Method Description default StringtoHost()Returns the "host" depending on whether an IP-Address has been provided or a host name.default StringtoHttpUrl()default StringtoLocator()Creates the locator part from theUrlinstance's state, excluding the fragment or the query fields.default URLtoURL()Methods inherited from interface org.refcodes.mixin.Dumpable
toDump, toDump, toPrintableMethods inherited from interface org.refcodes.web.FragmentAccessor
getFragmentMethods inherited from interface org.refcodes.web.HostAccessor
getHostMethods inherited from interface org.refcodes.mixin.IdentityAccessor
getIdentityMethods inherited from interface org.refcodes.web.IpAddressAccessor
getIpAddress, toCidrNotationMethods inherited from interface org.refcodes.mixin.PathAccessor
getPathMethods inherited from interface org.refcodes.mixin.PortAccessor
getPortMethods inherited from interface org.refcodes.web.QueryFieldsAccessor
getQueryFieldsMethods inherited from interface org.refcodes.web.SchemeAccessor
getScheme, toProtocolMethods inherited from interface org.refcodes.mixin.SecretAccessor
getSecret
-
Method Details
-
toHost
Returns the "host" depending on whether an IP-Address has been provided or a host name.- Returns:
- The determined host.
-
toHttpUrl
-
toLocator
Creates the locator part from theUrlinstance's state, excluding the fragment or the query fields.- Returns:
- The locator for the given
Url.
-
toURL
- Returns:
- The according
URLinstance. - Throws:
MalformedURLException- thrown in case the state of yourUrlinstance cannot be used to construct a validURL, you may be missing some properties.
-