public static class UrlImpl.UrlBuilderImpl extends Object implements Url.UrlBuilder
Url.UrlBuilder
SchemeAccessor.SchemeBuilder<B extends SchemeAccessor.SchemeBuilder<B>>, SchemeAccessor.SchemeMutator, SchemeAccessor.SchemeProperty
HostAccessor.HostBuilder<B extends HostAccessor.HostBuilder<?>>, HostAccessor.HostMutator, HostAccessor.HostProperty
IpAddressAccessor.IpAddressBuilder<B extends IpAddressAccessor.IpAddressBuilder<B>>, IpAddressAccessor.IpAddressMutator, IpAddressAccessor.IpAddressProperty
org.refcodes.mixin.PortAccessor.PortBuilder<B extends org.refcodes.mixin.PortAccessor.PortBuilder<B>>, org.refcodes.mixin.PortAccessor.PortMutator, org.refcodes.mixin.PortAccessor.PortProperty
org.refcodes.mixin.PathAccessor.PathBuilder<B extends org.refcodes.mixin.PathAccessor.PathBuilder<?>>, org.refcodes.mixin.PathAccessor.PathMutator, org.refcodes.mixin.PathAccessor.PathProperty
QueryFieldsAccessor.QueryFieldsBuilder<B extends QueryFieldsAccessor.QueryFieldsBuilder<?>>, QueryFieldsAccessor.QueryFieldsMutator, QueryFieldsAccessor.QueryFieldsProperty
FragmentAccessor.FragmentBuilder<B extends FragmentAccessor.FragmentBuilder<?>>, FragmentAccessor.FragmentMutator, FragmentAccessor.FragmentProperty
org.refcodes.mixin.CredentialsAccessor.CredentialsBuilder<B extends org.refcodes.mixin.CredentialsAccessor.CredentialsBuilder<B>>, org.refcodes.mixin.CredentialsAccessor.CredentialsMutator, org.refcodes.mixin.CredentialsAccessor.CredentialsProperty
org.refcodes.mixin.IdentityAccessor.IdentityBuilder<B extends org.refcodes.mixin.IdentityAccessor.IdentityBuilder<B>>, org.refcodes.mixin.IdentityAccessor.IdentityMutator, org.refcodes.mixin.IdentityAccessor.IdentityProperty
Constructor and Description |
---|
UrlBuilderImpl()
Default constructor.
|
UrlBuilderImpl(org.refcodes.data.Scheme aScheme,
String aHost)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(org.refcodes.data.Scheme aScheme,
String aHost,
int aPort)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(org.refcodes.data.Scheme aScheme,
String aHost,
int aPort,
String aPath)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(org.refcodes.data.Scheme aScheme,
String aHost,
int aPort,
String aPath,
FormFields aQueryFields)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(org.refcodes.data.Scheme aScheme,
String aHost,
int aPort,
String aPath,
FormFields aQueryFields,
String aFragment)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(org.refcodes.data.Scheme aScheme,
String aHost,
String aPath)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(org.refcodes.data.Scheme aScheme,
String aHost,
String aPath,
FormFields aQueryFields)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(org.refcodes.data.Scheme aScheme,
String aHost,
String aPath,
FormFields aQueryFields,
String aFragment)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(String aUrl)
Constructs an
UrlBuilder from the provided URL
String . |
UrlBuilderImpl(String aUrl,
FormFields aQueryFields)
Constructs an
UrlBuilder from the provided URL
String . |
UrlBuilderImpl(String aUrl,
FormFields aQueryFields,
String aFragment)
Constructs an
UrlBuilder from the provided URL
String . |
UrlBuilderImpl(String aProtocol,
String aHost)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(String aProtocol,
String aHost,
int aPort)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(String aProtocol,
String aHost,
int aPort,
String aPath)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(String aProtocol,
String aHost,
int aPort,
String aPath,
FormFields aQueryFields)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(String aProtocol,
String aHost,
int aPort,
String aPath,
FormFields aQueryFields,
String aFragment)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(String aProtocol,
String aHost,
String aPath)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(String aProtocol,
String aHost,
String aPath,
FormFields aQueryFields)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(String aProtocol,
String aHost,
String aPath,
FormFields aQueryFields,
String aFragment)
Constructs an
UrlBuilder with the common attributes. |
UrlBuilderImpl(Url aUrl)
Creates an
UrlBuilder from the provided Url . |
UrlBuilderImpl(URL aURL)
Constructs an
UrlBuilder from the provided URL
instance. |
UrlBuilderImpl(Url aUrl,
String... aPaths)
|
UrlBuilderImpl(Url aUrl,
Url aOtherUrl)
|
Modifier and Type | Method and Description |
---|---|
String |
getFragment()
Retrieves the fragment from the fragment property.
|
String |
getHost()
Retrieves the host from the host property.
|
String |
getIdentity() |
int[] |
getIpAddress()
Retrieves the IP-Address from the IP-Address property.
|
String |
getPath() |
int |
getPort() |
FormFields |
getQueryFields()
Retrieves the request Query-Fields from the request Query-Fields
property.
|
org.refcodes.data.Scheme |
getScheme()
Retrieves the UrlScheme from the URL scheme.
|
String |
getSecret() |
void |
setFragment(String aFragment)
Sets the fragment for the fragment property.
|
void |
setHost(String aHost)
Sets the host for the host property.
|
void |
setIdentity(String aIdentity) |
void |
setIpAddress(int[] aIpAddress)
Sets the IP-Address for the IP-Address property.
|
void |
setPath(String aPath) |
void |
setPort(int aPort) |
void |
setProtocol(String aProtocol)
Sets the protocol
String representation for the scheme
property. |
void |
setQueryFields(FormFields aQueryFields)
Sets the request Query-Fields for the request Query-Fields property.
|
void |
setScheme(org.refcodes.data.Scheme aScheme)
Sets the UrlScheme for the URL scheme.
|
void |
setSecret(String aSecret) |
String |
toProtocol()
Retrieves the protocol representation from the
Scheme . |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fromUrl, fromURL, withCidrNotation, withFragment, withHost, withIdentity, withIpAddress, withPath, withPort, withProtocol, withQueryFields, withScheme, withSecret
toCidrNotation
fromCidrNotation
public UrlBuilderImpl()
public UrlBuilderImpl(Url aUrl)
UrlBuilder
from the provided Url
.aUrl
- The Url
from which to construct this instance.public UrlBuilderImpl(String aUrl) throws MalformedURLException
UrlBuilder
from the provided URL
String
.aUrl
- The URL String
to be parsed. The URL consists of
the scheme (protocol), the identify and the secret (optional),
the host as well as an optional port and the (optional) path.MalformedURLException
- in case the provided URL is considered
being malformed.public UrlBuilderImpl(String aUrl, FormFields aQueryFields) throws MalformedURLException
UrlBuilder
from the provided URL
String
.aUrl
- The URL String
to be parsed. The URL consists of
the scheme (protocol), the identify and the secret (optional),
the host as well as an optional port and the (optional) path.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.MalformedURLException
- in case the provided URL is considered
being malformed.public UrlBuilderImpl(String aUrl, FormFields aQueryFields, String aFragment) throws MalformedURLException
UrlBuilder
from the provided URL
String
.aUrl
- The URL String
to be parsed. The URL consists of
the scheme (protocol), the identify and the secret (optional),
the host as well as an optional port and the (optional) path.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.aFragment
- The fragment to be set.MalformedURLException
- in case the provided URL is considered
being malformed.public UrlBuilderImpl(URL aURL)
UrlBuilder
from the provided URL
instance.aURL
- The URL
to be used.public UrlBuilderImpl(org.refcodes.data.Scheme aScheme, String aHost)
UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for
the destination URL.aHost
- The host to which the destination URL is to point to.public UrlBuilderImpl(org.refcodes.data.Scheme aScheme, String aHost, int aPort)
UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for
the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.public UrlBuilderImpl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath)
UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for
the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL
is to point to.public UrlBuilderImpl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath, FormFields aQueryFields)
UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for
the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL
is to point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.public UrlBuilderImpl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath, FormFields aQueryFields, String aFragment)
UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for
the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL
is to point to.aFragment
- The fragment to be set.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.public UrlBuilderImpl(String aProtocol, String aHost)
UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.public UrlBuilderImpl(String aProtocol, String aHost, int aPort)
UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.public UrlBuilderImpl(String aProtocol, String aHost, int aPort, String aPath)
UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL
is to point to.public UrlBuilderImpl(String aProtocol, String aHost, int aPort, String aPath, FormFields aQueryFields)
UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL
is to point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.public UrlBuilderImpl(String aProtocol, String aHost, int aPort, String aPath, FormFields aQueryFields, String aFragment)
UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL
is to point to.aFragment
- The fragment to be set.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.public UrlBuilderImpl(org.refcodes.data.Scheme aScheme, String aHost, String aPath)
UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for
the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL
is to point to.public UrlBuilderImpl(org.refcodes.data.Scheme aScheme, String aHost, String aPath, FormFields aQueryFields)
UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for
the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL
is to point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.public UrlBuilderImpl(org.refcodes.data.Scheme aScheme, String aHost, String aPath, FormFields aQueryFields, String aFragment)
UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for
the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL
is to point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.aFragment
- The fragment to be set.public UrlBuilderImpl(String aProtocol, String aHost, String aPath)
UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL
is to point to.public UrlBuilderImpl(String aProtocol, String aHost, String aPath, FormFields aQueryFields)
UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL
is to point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.public UrlBuilderImpl(String aProtocol, String aHost, String aPath, FormFields aQueryFields, String aFragment)
UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL
is to point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.aFragment
- The fragment to be set.public org.refcodes.data.Scheme getScheme()
getScheme
in interface SchemeAccessor
public String toProtocol()
Scheme
. In case of
a scheme unknown by the Scheme
enumeration, then
SchemeAccessor.getScheme()
might return null whilst SchemeAccessor.toProtocol()
still
retrieves the unknown scheme's protocol representation (as of
SchemeAccessor.SchemeMutator.setProtocol(String)
).toProtocol
in interface SchemeAccessor
public void setScheme(org.refcodes.data.Scheme aScheme)
setScheme
in interface SchemeAccessor.SchemeMutator
aScheme
- The UrlScheme to be stored by the URL scheme.public void setProtocol(String aProtocol)
String
representation for the scheme
property. You must provide the scheme's specific part as well. In
case of HTTP, provide "http://". In case your provided protocol is
unknown by the Scheme
enumeration, then the scheme property
will not be set, though the SchemeAccessor.toProtocol()
still returns your protocol.setProtocol
in interface SchemeAccessor.SchemeMutator
aProtocol
- The UrlScheme's String
representation to be
stored by the URL scheme.public String getHost()
getHost
in interface HostAccessor
public void setHost(String aHost)
setHost
in interface HostAccessor.HostMutator
aHost
- The host to be stored by the host property.public int[] getIpAddress()
getIpAddress
in interface IpAddressAccessor
public void setIpAddress(int[] aIpAddress)
setIpAddress
in interface IpAddressAccessor.IpAddressMutator
aIpAddress
- The IP-Address to be stored by the IP-Address
property.public int getPort()
getPort
in interface org.refcodes.mixin.PortAccessor
public void setPort(int aPort)
setPort
in interface org.refcodes.mixin.PortAccessor.PortMutator
public String getPath()
getPath
in interface org.refcodes.mixin.PathAccessor
public void setPath(String aPath)
setPath
in interface org.refcodes.mixin.PathAccessor.PathMutator
public FormFields getQueryFields()
getQueryFields
in interface QueryFieldsAccessor
public void setQueryFields(FormFields aQueryFields)
setQueryFields
in interface QueryFieldsAccessor.QueryFieldsMutator
aQueryFields
- The request Query-Fields to be stored by the form
fields property.public String getFragment()
getFragment
in interface FragmentAccessor
public void setFragment(String aFragment)
setFragment
in interface FragmentAccessor.FragmentMutator
aFragment
- The fragment to be stored by the fragment property.public String getIdentity()
getIdentity
in interface org.refcodes.mixin.IdentityAccessor
public String getSecret()
getSecret
in interface org.refcodes.mixin.SecretAccessor
public void setIdentity(String aIdentity)
setIdentity
in interface org.refcodes.mixin.IdentityAccessor.IdentityMutator
public void setSecret(String aSecret)
setSecret
in interface org.refcodes.mixin.SecretAccessor.SecretMutator
Copyright © 2018. All rights reserved.