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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BareJidbareFrom(CharSequence jid) Get aBareJidrepresenting the given CharSequence.static BareJidGet aBareJidrepresenting the given String.static BareJidbareFrom(String jid, JxmppContext context) Get aBareJidrepresenting the given String.static BareJidbareFrom(Localpart localpart, DomainBareJid domainBareJid) static BareJidbareFrom(Localpart localpart, Domainpart domain) static BareJidstatic BareJidLikebareFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static BareJidGet aBareJidfrom an URL encoded CharSequence.static DomainBareJidGet a domain bare JID.static DomainBareJiddomainBareFrom(String jid) Get a domain bare JID.static DomainBareJiddomainBareFrom(String jid, JxmppContext context) Get a domain bare JID.static DomainBareJiddomainBareFrom(Domainpart domainpart) Get aDomainBareJidconsisting of the givenDomainpart.static DomainBareJidstatic DomainBareJidLikedomainBareFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static DomainBareJidGet aDomainBareJidfrom an URL encoded CharSequence.static DomainFullJidGet a domain full JID from the given CharSequence.static DomainFullJiddomainFullFrom(String jid) Get a domain full JID from the given String.static DomainFullJiddomainFullFrom(String jid, JxmppContext context) Get a domain full JID from the given String.static DomainFullJiddomainFullFrom(DomainBareJid domainBareJid, Resourcepart resource) Get a domain full JID.static DomainFullJiddomainFullFrom(Domainpart domainpart, Resourcepart resource) Get a domain full JID.static DomainFullJidstatic DomainFullJidLikedomainFullFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static DomainFullJidGet aDomainFullJidfrom an URL encoded CharSequence.static EntityBareJidGet aEntityBareJidrepresenting the given CharSequence.static EntityBareJidentityBareFrom(CharSequence localpart, Domainpart domain) static EntityBareJidentityBareFrom(String jid) Get aEntityBareJidrepresenting the given String.static EntityBareJidentityBareFrom(String jid, JxmppContext context) Get aEntityBareJidrepresenting the given String.static EntityBareJidentityBareFrom(Localpart localpart, DomainBareJid domainBareJid) Get aEntityBareJidconstructed from the givenLocalpartand {link DomainBareJid}.static EntityBareJidentityBareFrom(Localpart localpart, Domainpart domain) static EntityBareJidstatic EntityBareJidLikeentityBareFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityBareJidentityBareFromUnescaped(CharSequence unescapedJid) Get aEntityBareJidrepresenting the given unescaped CharSequence.static EntityBareJidentityBareFromUnescaped(String unescapedJidString) Get aEntityBareJidrepresenting the given unescaped String.static EntityBareJidentityBareFromUnescaped(String unescapedJidString, JxmppContext context) Get aEntityBareJidrepresenting the given unescaped String.static EntityBareJidstatic EntityBareJidLikeentityBareFromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityBareJidGet aEntityBareJidfrom an URL encoded CharSequence.static EntityJidentityFrom(CharSequence jid) Get aEntityJidrepresenting the given String.static EntityJidentityFrom(String jidString) Get aEntityJidrepresenting the given String.static EntityJidentityFrom(String jidString, JxmppContext context) Get aEntityJidrepresenting the given String.static EntityJidstatic EntityJidLikeentityFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityJidDeprecated.static EntityJidGet aEntityJidrepresenting the given String.static EntityJidentityFromUnescaped(CharSequence jid, JxmppContext context) Get aEntityJidrepresenting the given String.static EntityJidentityFromUnescaped(String jidString) Get aEntityJidrepresenting the given String.static EntityJidentityFromUnescaped(String jidString, JxmppContext context) Get aEntityJidrepresenting the given String.static EntityJidstatic EntityJidLikeentityFromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityJidentityFromUnescapedOrThrowUnchecked(CharSequence cs, JxmppContext context) LikeentityFromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityJidGet aEntityJidfrom an URL encoded CharSequence.static EntityFullJidGet aEntityFullJidrepresenting the given CharSequence.static EntityFullJidentityFullFrom(CharSequence localpart, Domainpart domainpart, CharSequence resource) Get aEntityFullJidconstructed from the given parts.static EntityFullJidentityFullFrom(String localpart, String domainpart, String resource) Get aEntityFullJidconstructed from the given parts.static EntityFullJidentityFullFrom(String localpart, String domainpart, String resource, JxmppContext context) Get aEntityFullJidconstructed from the given parts.static EntityFullJidentityFullFrom(String jid, JxmppContext context) Get aEntityFullJidrepresenting the given String.static EntityFullJidentityFullFrom(EntityBareJid bareJid, Resourcepart resource) static EntityFullJidentityFullFrom(Localpart localpart, DomainBareJid domainBareJid, Resourcepart resource) Get aEntityFullJidconstructed from the given parts.static EntityFullJidentityFullFrom(Localpart localpart, Domainpart domainpart, Resourcepart resource) Get aEntityFullJidconstructed from the given parts.static EntityFullJidstatic EntityFullJidLikeentityFullFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityFullJidentityFullFromUnescaped(CharSequence unescapedJid) Get aEntityFullJidrepresenting the given unescaped CharSequence.static EntityFullJidentityFullFromUnescaped(String unescapedJidString) Get aEntityFullJidrepresenting the given unescaped String.static EntityFullJidentityFullFromUnescaped(String unescapedJidString, JxmppContext context) Get aEntityFullJidrepresenting the given unescaped String.static EntityFullJidstatic EntityFullJidLikeentityFullFromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityFullJidGet aEntityFullJidfrom an URL encoded CharSequence.static Jidfrom(CharSequence jid) Get aJidfrom a CharSequence.static Jidfrom(CharSequence localpart, CharSequence domainpart, CharSequence resource) Get aJidfrom the given parts.static JidGet aJidfrom the given String.static JidGet aJidfrom the given parts.static Jidfrom(String localpart, String domainpart, String resource, JxmppContext context) Get aJidfrom the given parts.static Jidfrom(String jidString, JxmppContext context) Get aJidfrom the given String.static Jidstatic JidLikefrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static JidfromUnescaped(CharSequence unescapedJid) Get aJidfrom the given unescaped CharSequence.static JidfromUnescaped(String unescapedJidString) Get aJidfrom the given unescaped String.static Jidstatic JidLikefromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static JidGet aJidfrom an URL encoded CharSequence.static FullJidfullFrom(CharSequence jid) Get aFullJidrepresenting the given CharSequence.static FullJidGet aFullJidrepresenting the given String.static FullJidGet aFullJidconstructed from the given parts.static FullJidfullFrom(String localpart, String domainpart, String resource, JxmppContext context) Get aFullJidconstructed from the given parts.static FullJidfullFrom(String jid, JxmppContext context) Get aFullJidrepresenting the given String.static FullJidfullFrom(BareJid bareJid, Resourcepart resource) static FullJidfullFrom(Localpart localpart, DomainBareJid domainBareJid, Resourcepart resource) Get aFullJidconstructed from the given parts.static FullJidfullFrom(Localpart localpart, Domainpart domainpart, Resourcepart resource) Get aFullJidconstructed from the given parts.static FullJidstatic FullJidLikefullFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static FullJidGet aFullJidfrom 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 aJidfrom 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 aJidfrom 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 aJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aJid- Returns:
- the
Jidif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
from
Get aJidfrom 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 aJidfrom 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 aJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aJid- Returns:
- the
Jidif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
fromUnescaped
Get aJidfrom the given unescaped CharSequence.- Parameters:
unescapedJid- an unescaped CharSequence representing a JID.- Returns:
- a JID.
- Throws:
XmppStringprepException- if an error occurs.
-
fromUnescaped
Get aJidfrom 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 aJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aBareJid- Returns:
- the
BareJidif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
bareFrom
Get aBareJidrepresenting the given CharSequence.- Parameters:
jid- the input CharSequence.- Returns:
- a bare JID representing the given CharSequence.
- Throws:
XmppStringprepException- if an error occurs.
-
bareFrom
Get aBareJidrepresenting the given String.- Parameters:
jid- the input String.- Returns:
- a bare JID representing the given String.
- Throws:
XmppStringprepException- if an error occurs.
-
bareFrom
Get aBareJidrepresenting 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 aBareJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aFullJid- Returns:
- the
FullJidif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
fullFrom
Get aFullJidrepresenting 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 aFullJidrepresenting 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 aFullJidrepresenting 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 aFullJidconstructed 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 aFullJidconstructed 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 aFullJidconstructed from the given parts.- Parameters:
localpart- a optional localpart.domainBareJid- a domain bare JID.resource- a resourcepart- Returns:
- a full JID.
-
fullFrom
Get aFullJidconstructed 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 aFullJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aEntityJid- Returns:
- the
EntityJidif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityFrom
Get aEntityJidrepresenting 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 aEntityJidrepresenting 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 aEntityJidrepresenting 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aEntityJid- Returns:
- the
EntityJidif 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aEntityJidcontext- the JXMPP context.- Returns:
- the
EntityJidif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityFromUnescaped
Get aEntityJidrepresenting 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 aEntityJidrepresenting 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 aEntityJidrepresenting 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 aEntityJidrepresenting 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 aEntityJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aEntityBareJid- Returns:
- the
EntityBareJidif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityBareFrom
Get aEntityBareJidrepresenting the given CharSequence.- Parameters:
jid- the input CharSequence.- Returns:
- a bare JID representing the given CharSequence.
- Throws:
XmppStringprepException- if an error occurs.
-
entityBareFrom
Get aEntityBareJidrepresenting 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 aEntityBareJidrepresenting 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aEntityBareJid- Returns:
- the
EntityBareJidif 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 aEntityBareJidrepresenting 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 aEntityBareJidrepresenting 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 aEntityBareJidrepresenting 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 aEntityBareJidconstructed from the givenLocalpartand {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 aEntityBareJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aEntityFullJid- Returns:
- the
EntityFullJidif no exception occurs - Throws:
IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
-
entityFullFrom
Get aEntityFullJidrepresenting 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 aEntityFullJidrepresenting 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aEntityFullJid- Returns:
- the
EntityFullJidif 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 aEntityFullJidrepresenting 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 aEntityFullJidrepresenting 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 aEntityFullJidrepresenting 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 aEntityFullJidconstructed 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 aEntityFullJidconstructed 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 aEntityFullJidconstructed 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 aEntityFullJidconstructed 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 aEntityFullJidconstructed 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 aEntityFullJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aEntityFullJid- Returns:
- the
EntityFullJidif 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 aDomainBareJidconsisting 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 aDomainBareJidfrom 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 uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.- Parameters:
cs- the character sequence which should be transformed to aDomainFullJid- Returns:
- the
DomainFullJidif 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 aDomainFullJidfrom 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.