Package org.jxmpp.jid.impl
Class JidCreate
java.lang.Object
org.jxmpp.jid.impl.JidCreate
API to create JIDs (XMPP addresses) from Strings and CharSequences.
If the input was user generated, e.g. captured from some sort of user
interface, fromUnescaped(String)
should be used instead. This allows
the user to enter unescaped JID values. You can use
JidUtil.isValidEntityBareJid(CharSequence)
to
query, e.g. while the user it entering it, if a given CharSequence is a valid
bare JID.
JIDs created from input received from an XMPP source should use
from(String)
.
JidCreate uses caches for efficient Jid construction, But it's not guaranteed that the same String or CharSequence will yield the same Jid instance.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BareJid
bareFrom
(CharSequence jid) Get aBareJid
representing the given CharSequence.static BareJid
Get aBareJid
representing the given String.static BareJid
bareFrom
(String jid, JxmppContext context) Get aBareJid
representing the given String.static BareJid
bareFrom
(Localpart localpart, DomainBareJid domainBareJid) static BareJid
bareFrom
(Localpart localpart, Domainpart domain) static BareJid
static BareJid
LikebareFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static BareJid
Get aBareJid
from an URL encoded CharSequence.static DomainBareJid
Get a domain bare JID.static DomainBareJid
domainBareFrom
(String jid) Get a domain bare JID.static DomainBareJid
domainBareFrom
(String jid, JxmppContext context) Get a domain bare JID.static DomainBareJid
domainBareFrom
(Domainpart domainpart) Get aDomainBareJid
consisting of the givenDomainpart
.static DomainBareJid
static DomainBareJid
LikedomainBareFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static DomainBareJid
Get aDomainBareJid
from an URL encoded CharSequence.static DomainFullJid
Get a domain full JID from the given CharSequence.static DomainFullJid
domainFullFrom
(String jid) Get a domain full JID from the given String.static DomainFullJid
domainFullFrom
(String jid, JxmppContext context) Get a domain full JID from the given String.static DomainFullJid
domainFullFrom
(DomainBareJid domainBareJid, Resourcepart resource) Get a domain full JID.static DomainFullJid
domainFullFrom
(Domainpart domainpart, Resourcepart resource) Get a domain full JID.static DomainFullJid
static DomainFullJid
LikedomainFullFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static DomainFullJid
Get aDomainFullJid
from an URL encoded CharSequence.static EntityBareJid
Get aEntityBareJid
representing the given CharSequence.static EntityBareJid
entityBareFrom
(CharSequence localpart, Domainpart domain) static EntityBareJid
entityBareFrom
(String jid) Get aEntityBareJid
representing the given String.static EntityBareJid
entityBareFrom
(String jid, JxmppContext context) Get aEntityBareJid
representing the given String.static EntityBareJid
entityBareFrom
(Localpart localpart, DomainBareJid domainBareJid) Get aEntityBareJid
constructed from the givenLocalpart
and {link DomainBareJid}.static EntityBareJid
entityBareFrom
(Localpart localpart, Domainpart domain) static EntityBareJid
static EntityBareJid
LikeentityBareFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static EntityBareJid
entityBareFromUnescaped
(CharSequence unescapedJid) Get aEntityBareJid
representing the given unescaped CharSequence.static EntityBareJid
entityBareFromUnescaped
(String unescapedJidString) Get aEntityBareJid
representing the given unescaped String.static EntityBareJid
entityBareFromUnescaped
(String unescapedJidString, JxmppContext context) Get aEntityBareJid
representing the given unescaped String.static EntityBareJid
static EntityBareJid
LikeentityBareFromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static EntityBareJid
Get aEntityBareJid
from an URL encoded CharSequence.static EntityJid
entityFrom
(CharSequence jid) Get aEntityJid
representing the given String.static EntityJid
entityFrom
(String jidString) Get aEntityJid
representing the given String.static EntityJid
entityFrom
(String jidString, JxmppContext context) Get aEntityJid
representing the given String.static EntityJid
static EntityJid
LikeentityFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static EntityJid
Deprecated.static EntityJid
Get aEntityJid
representing the given String.static EntityJid
entityFromUnescaped
(CharSequence jid, JxmppContext context) Get aEntityJid
representing the given String.static EntityJid
entityFromUnescaped
(String jidString) Get aEntityJid
representing the given String.static EntityJid
entityFromUnescaped
(String jidString, JxmppContext context) Get aEntityJid
representing the given String.static EntityJid
static EntityJid
LikeentityFromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static EntityJid
entityFromUnescapedOrThrowUnchecked
(CharSequence cs, JxmppContext context) LikeentityFromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static EntityJid
Get aEntityJid
from an URL encoded CharSequence.static EntityFullJid
Get aEntityFullJid
representing the given CharSequence.static EntityFullJid
entityFullFrom
(CharSequence localpart, Domainpart domainpart, CharSequence resource) Get aEntityFullJid
constructed from the given parts.static EntityFullJid
entityFullFrom
(String localpart, String domainpart, String resource) Get aEntityFullJid
constructed from the given parts.static EntityFullJid
entityFullFrom
(String localpart, String domainpart, String resource, JxmppContext context) Get aEntityFullJid
constructed from the given parts.static EntityFullJid
entityFullFrom
(String jid, JxmppContext context) Get aEntityFullJid
representing the given String.static EntityFullJid
entityFullFrom
(EntityBareJid bareJid, Resourcepart resource) static EntityFullJid
entityFullFrom
(Localpart localpart, DomainBareJid domainBareJid, Resourcepart resource) Get aEntityFullJid
constructed from the given parts.static EntityFullJid
entityFullFrom
(Localpart localpart, Domainpart domainpart, Resourcepart resource) Get aEntityFullJid
constructed from the given parts.static EntityFullJid
static EntityFullJid
LikeentityFullFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static EntityFullJid
entityFullFromUnescaped
(CharSequence unescapedJid) Get aEntityFullJid
representing the given unescaped CharSequence.static EntityFullJid
entityFullFromUnescaped
(String unescapedJidString) Get aEntityFullJid
representing the given unescaped String.static EntityFullJid
entityFullFromUnescaped
(String unescapedJidString, JxmppContext context) Get aEntityFullJid
representing the given unescaped String.static EntityFullJid
static EntityFullJid
LikeentityFullFromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static EntityFullJid
Get aEntityFullJid
from an URL encoded CharSequence.static Jid
from
(CharSequence jid) Get aJid
from a CharSequence.static Jid
from
(CharSequence localpart, CharSequence domainpart, CharSequence resource) Get aJid
from the given parts.static Jid
Get aJid
from the given String.static Jid
Get aJid
from the given parts.static Jid
from
(String localpart, String domainpart, String resource, JxmppContext context) Get aJid
from the given parts.static Jid
from
(String jidString, JxmppContext context) Get aJid
from the given String.static Jid
static Jid
Likefrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static Jid
fromUnescaped
(CharSequence unescapedJid) Get aJid
from the given unescaped CharSequence.static Jid
fromUnescaped
(String unescapedJidString) Get aJid
from the given unescaped String.static Jid
static Jid
LikefromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static Jid
Get aJid
from an URL encoded CharSequence.static FullJid
fullFrom
(CharSequence jid) Get aFullJid
representing the given CharSequence.static FullJid
Get aFullJid
representing the given String.static FullJid
Get aFullJid
constructed from the given parts.static FullJid
fullFrom
(String localpart, String domainpart, String resource, JxmppContext context) Get aFullJid
constructed from the given parts.static FullJid
fullFrom
(String jid, JxmppContext context) Get aFullJid
representing the given String.static FullJid
fullFrom
(BareJid bareJid, Resourcepart resource) static FullJid
fullFrom
(Localpart localpart, DomainBareJid domainBareJid, Resourcepart resource) Get aFullJid
constructed from the given parts.static FullJid
fullFrom
(Localpart localpart, Domainpart domainpart, Resourcepart resource) Get aFullJid
constructed from the given parts.static FullJid
static FullJid
LikefullFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.static FullJid
Get aFullJid
from an URL encoded CharSequence.
-
Constructor Details
-
JidCreate
public JidCreate()
-
-
Method Details
-
from
public static Jid from(CharSequence localpart, CharSequence domainpart, CharSequence resource) throws XmppStringprepException Get aJid
from the given parts.Only the domainpart is required.
- Parameters:
localpart
- a optional localpart.domainpart
- a required domainpart.resource
- a optional resourcepart.- Returns:
- a JID which consists of the given parts.
- Throws:
XmppStringprepException
- if an error occurs.
-
from
public static Jid from(String localpart, String domainpart, String resource) throws XmppStringprepException Get aJid
from the given parts.Only the domainpart is required.
- Parameters:
localpart
- a optional localpart.domainpart
- a required domainpart.resource
- a optional resourcepart.- Returns:
- a JID which consists of the given parts.
- Throws:
XmppStringprepException
- if an error occurs.
-
from
public static Jid from(String localpart, String domainpart, String resource, JxmppContext context) throws XmppStringprepException Get aJid
from the given parts.Only the domainpart is required.
- Parameters:
localpart
- a optional localpart.domainpart
- a required domainpart.resource
- a optional resourcepart.context
- the JXMPP context.- Returns:
- a JID which consists of the given parts.
- Throws:
XmppStringprepException
- if an error occurs.
-
fromOrThrowUnchecked
Likefrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aJid
- Returns:
- the
Jid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
from
Get aJid
from a CharSequence.- Parameters:
jid
- the input CharSequence.- Returns:
- the Jid represented by the input CharSequence.
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
from
Get aJid
from the given String.- Parameters:
jidString
- the input String.- Returns:
- the Jid represented by the input String.
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
from
Get aJid
from the given String.- Parameters:
jidString
- the input String.context
- the JXMPP context.- Returns:
- the Jid represented by the input String.
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
fromOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
fromUnescapedOrThrowUnchecked
LikefromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aJid
- Returns:
- the
Jid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
fromUnescaped
Get aJid
from the given unescaped CharSequence.- Parameters:
unescapedJid
- an unescaped CharSequence representing a JID.- Returns:
- a JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
fromUnescaped
Get aJid
from the given unescaped String.- Parameters:
unescapedJidString
- a unescaped String representing a JID.- Returns:
- a JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
fromUnescapedOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
fromUrlEncoded
Get aJid
from an URL encoded CharSequence.- Parameters:
cs
- a CharSequence representing an URL encoded JID.- Returns:
- a JID
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
bareFromOrThrowUnchecked
LikebareFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aBareJid
- Returns:
- the
BareJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
bareFrom
Get aBareJid
representing the given CharSequence.- Parameters:
jid
- the input CharSequence.- Returns:
- a bare JID representing the given CharSequence.
- Throws:
XmppStringprepException
- if an error occurs.
-
bareFrom
Get aBareJid
representing the given String.- Parameters:
jid
- the input String.- Returns:
- a bare JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
bareFrom
Get aBareJid
representing the given String.- Parameters:
jid
- the input String.context
- the JXMPP context.- Returns:
- a bare JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
bareFrom
- Parameters:
localpart
- a optional localpart.domainBareJid
- a domain bare JID.- Returns:
- a bare JID.
-
bareFrom
- Parameters:
localpart
- a optional localpart.domain
- a domainpart.- Returns:
- a bare JID constructed from the given parts.
-
bareFromOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
bareFromUrlEncoded
Get aBareJid
from an URL encoded CharSequence.- Parameters:
cs
- a CharSequence representing an URL encoded bare JID.- Returns:
- a bare JID
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
fullFromOrThrowUnchecked
LikefullFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aFullJid
- Returns:
- the
FullJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
fullFrom
Get aFullJid
representing the given CharSequence.- Parameters:
jid
- a CharSequence representing a JID.- Returns:
- a full JID representing the given CharSequence.
- Throws:
XmppStringprepException
- if an error occurs.
-
fullFrom
Get aFullJid
representing the given String.- Parameters:
jid
- the JID's String.- Returns:
- a full JID representing the input String.
- Throws:
XmppStringprepException
- if an error occurs.
-
fullFrom
Get aFullJid
representing the given String.- Parameters:
jid
- the JID's String.context
- the JXMPP context.- Returns:
- a full JID representing the input String.
- Throws:
XmppStringprepException
- if an error occurs.
-
fullFrom
public static FullJid fullFrom(String localpart, String domainpart, String resource) throws XmppStringprepException Get aFullJid
constructed from the given parts.- Parameters:
localpart
- a optional localpart.domainpart
- a domainpart.resource
- a resourcepart.- Returns:
- a full JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
fullFrom
public static FullJid fullFrom(String localpart, String domainpart, String resource, JxmppContext context) throws XmppStringprepException Get aFullJid
constructed from the given parts.- Parameters:
localpart
- a optional localpart.domainpart
- a domainpart.resource
- a resourcepart.context
- the JXMPP context.- Returns:
- a full JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
fullFrom
public static FullJid fullFrom(Localpart localpart, DomainBareJid domainBareJid, Resourcepart resource) Get aFullJid
constructed from the given parts.- Parameters:
localpart
- a optional localpart.domainBareJid
- a domain bare JID.resource
- a resourcepart- Returns:
- a full JID.
-
fullFrom
Get aFullJid
constructed from the given parts.- Parameters:
localpart
- the optional localpart.domainpart
- the domainpart.resource
- the resourcepart.- Returns:
- a full JID.
-
fullFrom
- Parameters:
bareJid
- a entity bare JID.resource
- a resourcepart.- Returns:
- a full JID.
-
fullFromOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
fullFromUrlEncoded
Get aFullJid
from an URL encoded CharSequence.- Parameters:
cs
- a CharSequence representing an URL encoded full JID.- Returns:
- a full JID
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
entityFromOrThrowUnchecked
LikeentityFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aEntityJid
- Returns:
- the
EntityJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityFrom
Get aEntityJid
representing the given String.- Parameters:
jid
- the JID's string.- Returns:
- an entity JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFrom
Get aEntityJid
representing the given String.- Parameters:
jidString
- the JID's string.- Returns:
- an entity JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFrom
public static EntityJid entityFrom(String jidString, JxmppContext context) throws XmppStringprepException Get aEntityJid
representing the given String.- Parameters:
jidString
- the JID's string.context
- the JXMPP context.- Returns:
- an entity JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFromUnescapedOrThrowUnchecked
LikeentityFromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aEntityJid
- Returns:
- the
EntityJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityFromUnescapedOrThrowUnchecked
LikeentityFromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aEntityJid
context
- the JXMPP context.- Returns:
- the
EntityJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityFromUnescaped
Get aEntityJid
representing the given String.- Parameters:
jid
- the JID.- Returns:
- an entity JID representing the given input..
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFromUnescaped
public static EntityJid entityFromUnescaped(CharSequence jid, JxmppContext context) throws XmppStringprepException Get aEntityJid
representing the given String.- Parameters:
jid
- the JID.context
- the JXMPP context.- Returns:
- an entity JID representing the given input.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFromUnescaped
Get aEntityJid
representing the given String.- Parameters:
jidString
- the JID's string.- Returns:
- an entity JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFromUnescaped
public static EntityJid entityFromUnescaped(String jidString, JxmppContext context) throws XmppStringprepException Get aEntityJid
representing the given String.- Parameters:
jidString
- the JID's string.context
- the JXMPP context.- Returns:
- an entity JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFromUnesacpedOrNull
Deprecated.useentityFromUnescapedOrNull(CharSequence)
instead.- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
entityFromUnescapedOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
entityFromOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
entityFromUrlEncoded
Get aEntityJid
from an URL encoded CharSequence.- Parameters:
cs
- a CharSequence representing an URL encoded entity JID.- Returns:
- an entity JID
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
entityBareFromOrThrowUnchecked
LikeentityBareFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aEntityBareJid
- Returns:
- the
EntityBareJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityBareFrom
Get aEntityBareJid
representing the given CharSequence.- Parameters:
jid
- the input CharSequence.- Returns:
- a bare JID representing the given CharSequence.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityBareFrom
Get aEntityBareJid
representing the given String.- Parameters:
jid
- the input String.- Returns:
- a bare JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityBareFrom
public static EntityBareJid entityBareFrom(String jid, JxmppContext context) throws XmppStringprepException Get aEntityBareJid
representing the given String.- Parameters:
jid
- the input String.context
- the JXMPP context.- Returns:
- a bare JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityBareFromUnescapedOrThrowUnchecked
LikeentityBareFromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aEntityBareJid
- Returns:
- the
EntityBareJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityBareFromUnescaped
public static EntityBareJid entityBareFromUnescaped(CharSequence unescapedJid) throws XmppStringprepException Get aEntityBareJid
representing the given unescaped CharSequence.- Parameters:
unescapedJid
- the input CharSequence.- Returns:
- a bare JID representing the given CharSequence.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityBareFromUnescaped
public static EntityBareJid entityBareFromUnescaped(String unescapedJidString) throws XmppStringprepException Get aEntityBareJid
representing the given unescaped String.- Parameters:
unescapedJidString
- the input String.- Returns:
- a bare JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityBareFromUnescaped
public static EntityBareJid entityBareFromUnescaped(String unescapedJidString, JxmppContext context) throws XmppStringprepException Get aEntityBareJid
representing the given unescaped String.- Parameters:
unescapedJidString
- the input String.context
- the JXMPP context.- Returns:
- a bare JID representing the given String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityBareFromUnescapedOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
entityBareFrom
Get aEntityBareJid
constructed from the givenLocalpart
and {link DomainBareJid}.- Parameters:
localpart
- a localpart.domainBareJid
- a domain bare JID.- Returns:
- a bare JID.
-
entityBareFrom
- Parameters:
localpart
- a localpart.domain
- a domainpart.- Returns:
- a bare JID constructed from the given parts.
-
entityBareFrom
public static EntityBareJid entityBareFrom(CharSequence localpart, Domainpart domain) throws XmppStringprepException - Parameters:
localpart
- a localpart.domain
- a domainpart.- Returns:
- a bare JID constructed from the given parts.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityBareFromOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
entityBareFromUrlEncoded
public static EntityBareJid entityBareFromUrlEncoded(CharSequence cs) throws XmppStringprepException Get aEntityBareJid
from an URL encoded CharSequence.- Parameters:
cs
- a CharSequence representing an URL encoded entity bare JID.- Returns:
- an entity bare JID
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
entityFullFromOrThrowUnchecked
LikeentityFullFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aEntityFullJid
- Returns:
- the
EntityFullJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityFullFrom
Get aEntityFullJid
representing the given CharSequence.- Parameters:
jid
- a CharSequence representing a JID.- Returns:
- a full JID representing the given CharSequence.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFullFrom
public static EntityFullJid entityFullFrom(String jid, JxmppContext context) throws XmppStringprepException Get aEntityFullJid
representing the given String.- Parameters:
jid
- the JID's String.context
- the JXMPP context.- Returns:
- a full JID representing the input String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFullFromOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
entityFullFromUnescapedOrThrowUnchecked
LikeentityFullFromUnescaped(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aEntityFullJid
- Returns:
- the
EntityFullJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityFullFromUnescaped
public static EntityFullJid entityFullFromUnescaped(CharSequence unescapedJid) throws XmppStringprepException Get aEntityFullJid
representing the given unescaped CharSequence.- Parameters:
unescapedJid
- a CharSequence representing a JID.- Returns:
- a full JID representing the given CharSequence.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFullFromUnescaped
public static EntityFullJid entityFullFromUnescaped(String unescapedJidString) throws XmppStringprepException Get aEntityFullJid
representing the given unescaped String.- Parameters:
unescapedJidString
- the JID's String.- Returns:
- a full JID representing the input String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFullFromUnescaped
public static EntityFullJid entityFullFromUnescaped(String unescapedJidString, JxmppContext context) throws XmppStringprepException Get aEntityFullJid
representing the given unescaped String.- Parameters:
unescapedJidString
- the JID's String.context
- the JXMPP context.- Returns:
- a full JID representing the input String.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFullFromUnescapedOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
entityFullFrom
public static EntityFullJid entityFullFrom(String localpart, String domainpart, String resource) throws XmppStringprepException Get aEntityFullJid
constructed from the given parts.- Parameters:
localpart
- a localpart.domainpart
- a domainpart.resource
- a resourcepart.- Returns:
- a full JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFullFrom
public static EntityFullJid entityFullFrom(String localpart, String domainpart, String resource, JxmppContext context) throws XmppStringprepException Get aEntityFullJid
constructed from the given parts.- Parameters:
localpart
- a localpart.domainpart
- a domainpart.resource
- a resourcepart.context
- the JXMPP context.- Returns:
- a full JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFullFrom
public static EntityFullJid entityFullFrom(Localpart localpart, DomainBareJid domainBareJid, Resourcepart resource) Get aEntityFullJid
constructed from the given parts.- Parameters:
localpart
- a localpart.domainBareJid
- a domain bare JID..resource
- a resourcepart- Returns:
- a full JID.
-
entityFullFrom
public static EntityFullJid entityFullFrom(Localpart localpart, Domainpart domainpart, Resourcepart resource) Get aEntityFullJid
constructed from the given parts.- Parameters:
localpart
- the localpart.domainpart
- the domainpart.resource
- the resourcepart.- Returns:
- a full JID.
-
entityFullFrom
public static EntityFullJid entityFullFrom(CharSequence localpart, Domainpart domainpart, CharSequence resource) throws XmppStringprepException Get aEntityFullJid
constructed from the given parts.- Parameters:
localpart
- the localpart.domainpart
- the domainpart.resource
- the resourcepart.- Returns:
- a full JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
entityFullFrom
- Parameters:
bareJid
- a bare JID.resource
- a resourcepart.- Returns:
- a full JID.
-
entityFullFromUrlEncoded
public static EntityFullJid entityFullFromUrlEncoded(CharSequence cs) throws XmppStringprepException Get aEntityFullJid
from an URL encoded CharSequence.- Parameters:
cs
- a CharSequence representing an URL encoded entity full JID.- Returns:
- an entity full JID
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
domainBareFromOrThrowUnchecked
LikedomainBareFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aEntityFullJid
- Returns:
- the
EntityFullJid
if no exception occurs - Since:
- 0.6.2
- See Also:
-
domainBareFrom
Get a domain bare JID.- Parameters:
jid
- the JID CharSequence.- Returns:
- a domain bare JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
domainBareFrom
Get a domain bare JID.- Parameters:
jid
- the JID String.- Returns:
- a domain bare JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
domainBareFrom
public static DomainBareJid domainBareFrom(String jid, JxmppContext context) throws XmppStringprepException Get a domain bare JID.- Parameters:
jid
- the JID String.context
- the JXMPP context.- Returns:
- a domain bare JID.
- Throws:
XmppStringprepException
- if an error occurs.
-
domainBareFrom
Get aDomainBareJid
consisting of the givenDomainpart
.- Parameters:
domainpart
- the domainpart.- Returns:
- a domain bare JID.
-
domainBareFromOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
domainBareFromUrlEncoded
public static DomainBareJid domainBareFromUrlEncoded(CharSequence cs) throws XmppStringprepException Get aDomainBareJid
from an URL encoded CharSequence.- Parameters:
cs
- a CharSequence representing an URL encoded domain bare JID.- Returns:
- a domain bare JID
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
domainFullFromOrThrowUnchecked
LikedomainFullFrom(CharSequence)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aDomainFullJid
- Returns:
- the
DomainFullJid
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
domainFullFrom
Get a domain full JID from the given CharSequence.- Parameters:
jid
- the JID.- Returns:
- a domain full JID.
- Throws:
XmppStringprepException
- if an error happens.
-
domainFullFrom
Get a domain full JID from the given String.- Parameters:
jid
- the JID.- Returns:
- a DomainFullJid.
- Throws:
XmppStringprepException
- if an error happens.
-
domainFullFrom
public static DomainFullJid domainFullFrom(String jid, JxmppContext context) throws XmppStringprepException Get a domain full JID from the given String.- Parameters:
jid
- the JID.context
- the JXMPP context.- Returns:
- a DomainFullJid.
- Throws:
XmppStringprepException
- if an error happens.
-
domainFullFrom
Get a domain full JID.- Parameters:
domainpart
- the domainpart.resource
- the resourcepart.- Returns:
- a domain full JID.
-
domainFullFrom
Get a domain full JID.- Parameters:
domainBareJid
- a domain bare JID.resource
- a resourcepart.- Returns:
- a domain full JID.
-
domainFullFromOrNull
- Parameters:
cs
- the inputCharSequence
- Returns:
- a JID or
null
-
domainFullFromUrlEncoded
public static DomainFullJid domainFullFromUrlEncoded(CharSequence cs) throws XmppStringprepException Get aDomainFullJid
from an URL encoded CharSequence.- Parameters:
cs
- a CharSequence representing an URL encoded domain full JID.- Returns:
- a domain full JID
- Throws:
XmppStringprepException
- if an error occurs.- See Also:
-
entityFromUnescapedOrNull(CharSequence)
instead.