SipURI.Builder| Constructor and Description |
|---|
SipURIImpl(boolean isSips,
Buffer userInfo,
Buffer host,
Buffer port,
Buffer paramsHeaders,
Buffer original) |
| Modifier and Type | Method and Description |
|---|---|
SipURI |
clone() |
SipURI.Builder |
copy()
All URIs are immutable so if you wish to change it you need to
obtain a copy of it which will return a new builder that allows
you to change and build a new URI.
|
boolean |
equals(Object other)
Comparing two
SipURIs aren't trivial and the full set of rules are described in
RFC3261 section 19.1.4
See rules for comparing URI's in RFC3261 section 19.1.4. |
Buffer |
getHost()
Get the host portion of this URI.
|
Optional<Buffer> |
getMAddrParam()
Get the maddr parameter.
|
Optional<Buffer> |
getMethodParam()
Get the method parameter.
|
Optional<Buffer> |
getParameter(Buffer name)
Get the value of the named parameter.
|
Optional<Buffer> |
getParameter(String name)
Same as
SipURI.getParameter(Buffer). |
int |
getPort()
Get the port.
|
Optional<Transport> |
getTransportParam()
Same as
#getParameter("transport") |
int |
getTTLParam()
Get the ttl parameter.
|
Optional<Buffer> |
getUser()
Get the user portion of this URI.
|
Optional<Buffer> |
getUserParam()
Get the user parameter.
|
int |
hashCode()
Now, the hash-code doesn't actually have to be unique for every little parameter and detail
as the
equals(Object) method is checking, we just need to take enough stuff into
account to have a good enough spread and then the equals-method would be used to sort out any
ties. |
boolean |
isSecure()
Check whether this is a sips URI.
|
boolean |
isSipURI()
Check whether this
URI is a "sip" or "sips" URI. |
Buffer |
toBuffer()
|
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, waitpublic SipURIImpl(boolean isSips,
Buffer userInfo,
Buffer host,
Buffer port,
Buffer paramsHeaders,
Buffer original)
isSips - whether this is a sip or sips URLuserInfo - contains the so-called "userinfo" portion. Typically this is
just the user but can optionally contain a password as well.
See SipParser.consumeUserInfoHostPort(Buffer) for more
information.hostPort - contains the so-called "hostport", which is the domain +
optional port.paramsHeaders - any uri-parameters or headers that were on the SIP uri will be
in this buffer. If empty or null then there were none.original - the original buffer just because as long as no one is changing
the content we can just return this buffer fast and easy.public boolean isSipURI()
URI is a "sip" or "sips" URI.public boolean isSecure()
public SipURI clone()
public SipURI.Builder copy()
URIpublic Buffer getHost()
public int getPort()
public Optional<Transport> getTransportParam() throws SipParseException
SipURI#getParameter("transport")getTransportParam in interface SipURISipParseExceptionpublic Optional<Buffer> getUserParam() throws SipParseException
SipURI#getParameter("user")getUserParam in interface SipURISipParseExceptionpublic int getTTLParam()
throws SipParseException
SipURI#getParameter("ttl")getTTLParam in interface SipURISipParseExceptionpublic Optional<Buffer> getMAddrParam() throws SipParseException
SipURI#getParameter("maddr")getMAddrParam in interface SipURISipParseExceptionpublic Optional<Buffer> getMethodParam() throws SipParseException
SipURI#getParameter("method")getMethodParam in interface SipURISipParseExceptionpublic boolean equals(Object other)
SipURIs aren't trivial and the full set of rules are described in
RFC3261 section 19.1.4
See rules for comparing URI's in RFC3261 section 19.1.4.public int hashCode()
equals(Object) method is checking, we just need to take enough stuff into
account to have a good enough spread and then the equals-method would be used to sort out any
ties.
public Optional<Buffer> getParameter(Buffer name) throws SipParseException, IllegalArgumentException
SipURIBuffer, which can be checked with
Buffer.isEmpty() or Buffer.capacity(), which will return zero. As with any
empty Buffer, if you do Buffer.toString() you will be getting an empty
String back, which would be yet another way to check for a flag parameter.getParameter in interface SipURIname - the name of the parameter we are looking for.SipParseException - in case anything goes wrong while extracting the parameter.IllegalArgumentException - in case the name is null.public Optional<Buffer> getParameter(String name) throws SipParseException, IllegalArgumentException
SipURISipURI.getParameter(Buffer).getParameter in interface SipURISipParseException - in case anything goes wrong while extracting the parameter.IllegalArgumentException - in case the name is null.Copyright © 2020. All Rights Reserved.