Package akka.http.impl.model
Class JavaUri
- java.lang.Object
-
- akka.http.javadsl.model.Uri
-
- akka.http.impl.model.JavaUri
-
- All Implemented Interfaces:
java.io.Serializable,scala.Equals,scala.Product
public class JavaUri extends Uri implements scala.Product, java.io.Serializable
INTERNAL API- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.http.javadsl.model.Uri
Uri.ParsingMode
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description UriaddPathSegment(java.lang.String segment)Returns a copy of this instance with a path segment added at the end.abstract static Rapply(T1 v1)UriasScala()Returns the Scala DSL representation of this Uri.java.util.Optional<java.lang.String>fragment()Returns the fragment part of this Uri.Urifragment(java.lang.String fragment)Returns a copy of this instance with a new fragment.Urifragment(java.util.Optional<java.lang.String> fragment)Returns a copy of this instance with a new optional fragment.HostgetHost()Returns the host of this instancejava.lang.StringgetPathString()Returns the path of this instanceintgetPort()Returns the port of this instancejava.lang.StringgetScheme()Returns the scheme of this instancejava.lang.StringgetUserInfo()Returns the user info of this instanceHosthost()Returns the Host of this Uri.Urihost(Host host)Returns a copy of this instance with a new Host.Urihost(java.lang.String host)Returns a copy of this instance with a new host.booleanisAbsolute()Returns if this is an absolute Uri.booleanisEmpty()Returns if this is an empty Uri.booleanisRelative()Returns if this is a relative Uri.java.lang.Stringpath()Returns a String representation of the path of this Uri.Uripath(java.lang.String path)Returns a copy of this instance with a new path.java.lang.Iterable<java.lang.String>pathSegments()Returns the path segments of this Uri as an Iterable.intport()Returns the port of this Uri.Uriport(int port)Returns a copy of this instance with a new port.Queryquery()Returns the parsed Query instance of this Uri.Uriquery(Query query)Returns a copy of this instance with a new query.Queryquery(java.nio.charset.Charset charset, Uri.ParsingMode mode)Returns the parsed Query instance of this Uri using the given charset and parsing mode.java.util.Optional<java.lang.String>queryString(java.nio.charset.Charset charset)Returns a decoded String representation of the query of this Uri.java.util.Optional<java.lang.String>rawQueryString()Returns an undecoded String representation of the query of this Uri.UrirawQueryString(java.lang.String rawQuery)Returns a copy of this instance with a new query.UrirawQueryString(java.lang.String rawQuery, boolean strict)Returns a copy of this instance with a new query.java.lang.Stringscheme()Returns the scheme of this Uri.Urischeme(java.lang.String scheme)Returns a copy of this instance with a new scheme.Urit(scala.Function1<Uri,Uri> f)UritoRelative()Returns a copy of this instance that is relative.java.lang.StringtoString()Uriuri()java.lang.StringuserInfo()Returns the user-info of this Uri.UriuserInfo(java.lang.String userInfo)Returns a copy of this instance with new user-info.
-
-
-
Constructor Detail
-
JavaUri
public JavaUri(Uri uri)
-
-
Method Detail
-
apply
public abstract static R apply(T1 v1)
-
uri
public Uri uri()
-
isRelative
public boolean isRelative()
Description copied from class:UriReturns if this is a relative Uri.- Specified by:
isRelativein classUri
-
isAbsolute
public boolean isAbsolute()
Description copied from class:UriReturns if this is an absolute Uri.- Specified by:
isAbsolutein classUri
-
isEmpty
public boolean isEmpty()
Description copied from class:UriReturns if this is an empty Uri.
-
scheme
public java.lang.String scheme()
Description copied from class:UriReturns the scheme of this Uri.
-
port
public int port()
Description copied from class:UriReturns the port of this Uri.
-
userInfo
public java.lang.String userInfo()
Description copied from class:UriReturns the user-info of this Uri.
-
path
public java.lang.String path()
Description copied from class:UriReturns a String representation of the path of this Uri.
-
getScheme
public java.lang.String getScheme()
Description copied from class:UriReturns the scheme of this instance
-
getPort
public int getPort()
Description copied from class:UriReturns the port of this instance
-
getUserInfo
public java.lang.String getUserInfo()
Description copied from class:UriReturns the user info of this instance- Specified by:
getUserInfoin classUri
-
getPathString
public java.lang.String getPathString()
Description copied from class:UriReturns the path of this instance- Specified by:
getPathStringin classUri
-
asScala
public Uri asScala()
Description copied from class:UriReturns the Scala DSL representation of this Uri.
-
pathSegments
public java.lang.Iterable<java.lang.String> pathSegments()
Description copied from class:UriReturns the path segments of this Uri as an Iterable.- Specified by:
pathSegmentsin classUri
-
rawQueryString
public java.util.Optional<java.lang.String> rawQueryString()
Description copied from class:UriReturns an undecoded String representation of the query of this Uri.- Specified by:
rawQueryStringin classUri
-
queryString
public java.util.Optional<java.lang.String> queryString(java.nio.charset.Charset charset)
Description copied from class:UriReturns a decoded String representation of the query of this Uri.- Specified by:
queryStringin classUri
-
query
public Query query()
Description copied from class:UriReturns the parsed Query instance of this Uri.
-
query
public Query query(java.nio.charset.Charset charset, Uri.ParsingMode mode)
Description copied from class:UriReturns the parsed Query instance of this Uri using the given charset and parsing mode.
-
fragment
public java.util.Optional<java.lang.String> fragment()
Description copied from class:UriReturns the fragment part of this Uri.
-
scheme
public Uri scheme(java.lang.String scheme)
Description copied from class:UriReturns a copy of this instance with a new scheme.
-
host
public Uri host(Host host)
Description copied from class:UriReturns a copy of this instance with a new Host.
-
host
public Uri host(java.lang.String host)
Description copied from class:UriReturns a copy of this instance with a new host.
-
port
public Uri port(int port)
Description copied from class:UriReturns a copy of this instance with a new port.
-
userInfo
public Uri userInfo(java.lang.String userInfo)
Description copied from class:UriReturns a copy of this instance with new user-info.
-
path
public Uri path(java.lang.String path)
Description copied from class:UriReturns a copy of this instance with a new path.
-
toRelative
public Uri toRelative()
Description copied from class:UriReturns a copy of this instance that is relative.- Specified by:
toRelativein classUri
-
rawQueryString
public Uri rawQueryString(java.lang.String rawQuery)
Description copied from class:UriReturns a copy of this instance with a new query. Characters that are not within the range described at https://tools.ietf.org/html/rfc3986#section-3.4 should be percent-encoded. Characters that are in that range may or may not be percent-encoded, and depending on how the query string is parsed this might be relevant: for example, when interpreting the query string as 'key=value' pairs you could use the percent-encoded '=' ('%22) to include a '=' in the key or value. When characters are encountered that are outside of the RFC3986 range they are automatically percent-encoded, but be aware that relying on this is usually a programming error.- Specified by:
rawQueryStringin classUri
-
rawQueryString
public Uri rawQueryString(java.lang.String rawQuery, boolean strict)
Description copied from class:UriReturns a copy of this instance with a new query. Characters that are not within the range described at https://tools.ietf.org/html/rfc3986#section-3.4 should be percent-encoded. Characters that are in that range may or may not be percent-encoded, and depending on how the query string is parsed this might be relevant: for example, when interpreting the query string as 'key=value' pairs you could use the percent-encoded '=' ('%22) to include a '=' in the key or value.- Specified by:
rawQueryStringin classUristrict- depending on the 'strict' flag, characters outside of the range allowed by RFC3986 will either cause a `IllegalUriException` or be automatically percent-encoded. Be aware that relying on automatic percent-encoding is usually a programming error.
-
query
public Uri query(Query query)
Description copied from class:UriReturns a copy of this instance with a new query.
-
addPathSegment
public Uri addPathSegment(java.lang.String segment)
Description copied from class:UriReturns a copy of this instance with a path segment added at the end.- Specified by:
addPathSegmentin classUri
-
fragment
public Uri fragment(java.util.Optional<java.lang.String> fragment)
Description copied from class:UriReturns a copy of this instance with a new optional fragment.
-
fragment
public Uri fragment(java.lang.String fragment)
Description copied from class:UriReturns a copy of this instance with a new fragment.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-