Package org.jxmpp.jid.impl
Class JidCreate
- java.lang.Object
-
- org.jxmpp.jid.impl.JidCreate
-
public class JidCreate extends java.lang.ObjectAPI 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 useJidUtil.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:
Jid
-
-
Constructor Summary
Constructors Constructor Description JidCreate()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BareJidbareFrom(java.lang.CharSequence jid)Get aBareJidrepresenting the given CharSequence.static BareJidbareFrom(java.lang.String jid)Get aBareJidrepresenting the given String.static BareJidbareFrom(java.lang.String jid, JxmppContext context)Get aBareJidrepresenting the given String.static BareJidbareFrom(Localpart localpart, DomainBareJid domainBareJid)static BareJidbareFrom(Localpart localpart, Domainpart domain)static BareJidbareFromOrNull(java.lang.CharSequence cs)static BareJidbareFromOrThrowUnchecked(java.lang.CharSequence cs)LikebareFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static BareJidbareFromUrlEncoded(java.lang.CharSequence cs)Get aBareJidfrom an URL encoded CharSequence.static DomainBareJiddomainBareFrom(java.lang.CharSequence jid)Get a domain bare JID.static DomainBareJiddomainBareFrom(java.lang.String jid)Get a domain bare JID.static DomainBareJiddomainBareFrom(java.lang.String jid, JxmppContext context)Get a domain bare JID.static DomainBareJiddomainBareFrom(Domainpart domainpart)Get aDomainBareJidconsisting of the givenDomainpart.static DomainBareJiddomainBareFromOrNull(java.lang.CharSequence cs)static DomainBareJiddomainBareFromOrThrowUnchecked(java.lang.CharSequence cs)LikedomainBareFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static DomainBareJiddomainBareFromUrlEncoded(java.lang.CharSequence cs)Get aDomainBareJidfrom an URL encoded CharSequence.static DomainFullJiddomainFullFrom(java.lang.CharSequence jid)Get a domain full JID from the given CharSequence.static DomainFullJiddomainFullFrom(java.lang.String jid)Get a domain full JID from the given String.static DomainFullJiddomainFullFrom(java.lang.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 DomainFullJiddomainFullFromOrNull(java.lang.CharSequence cs)static DomainFullJiddomainFullFromOrThrowUnchecked(java.lang.CharSequence cs)LikedomainFullFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static DomainFullJiddomainFullFromUrlEncoded(java.lang.CharSequence cs)Get aDomainFullJidfrom an URL encoded CharSequence.static EntityBareJidentityBareFrom(java.lang.CharSequence jid)Get aEntityBareJidrepresenting the given CharSequence.static EntityBareJidentityBareFrom(java.lang.CharSequence localpart, Domainpart domain)static EntityBareJidentityBareFrom(java.lang.String jid)Get aEntityBareJidrepresenting the given String.static EntityBareJidentityBareFrom(java.lang.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 EntityBareJidentityBareFromOrNull(java.lang.CharSequence cs)static EntityBareJidentityBareFromOrThrowUnchecked(java.lang.CharSequence cs)LikeentityBareFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityBareJidentityBareFromUnescaped(java.lang.CharSequence unescapedJid)Get aEntityBareJidrepresenting the given unescaped CharSequence.static EntityBareJidentityBareFromUnescaped(java.lang.String unescapedJidString)Get aEntityBareJidrepresenting the given unescaped String.static EntityBareJidentityBareFromUnescaped(java.lang.String unescapedJidString, JxmppContext context)Get aEntityBareJidrepresenting the given unescaped String.static EntityBareJidentityBareFromUnescapedOrNull(java.lang.CharSequence cs)static EntityBareJidentityBareFromUnescapedOrThrowUnchecked(java.lang.CharSequence cs)LikeentityBareFromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityBareJidentityBareFromUrlEncoded(java.lang.CharSequence cs)Get aEntityBareJidfrom an URL encoded CharSequence.static EntityJidentityFrom(java.lang.CharSequence jid)Get aEntityJidrepresenting the given String.static EntityJidentityFrom(java.lang.String jidString)Get aEntityJidrepresenting the given String.static EntityJidentityFrom(java.lang.String jidString, JxmppContext context)Get aEntityJidrepresenting the given String.static EntityJidentityFromOrNull(java.lang.CharSequence cs)static EntityJidentityFromOrThrowUnchecked(java.lang.CharSequence cs)LikeentityFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityJidentityFromUnesacpedOrNull(java.lang.CharSequence cs)Deprecated.useentityFromUnescapedOrNull(CharSequence)instead.static EntityJidentityFromUnescaped(java.lang.CharSequence jid)Get aEntityJidrepresenting the given String.static EntityJidentityFromUnescaped(java.lang.CharSequence jid, JxmppContext context)Get aEntityJidrepresenting the given String.static EntityJidentityFromUnescaped(java.lang.String jidString)Get aEntityJidrepresenting the given String.static EntityJidentityFromUnescaped(java.lang.String jidString, JxmppContext context)Get aEntityJidrepresenting the given String.static EntityJidentityFromUnescapedOrNull(java.lang.CharSequence cs)static EntityJidentityFromUnescapedOrThrowUnchecked(java.lang.CharSequence cs)LikeentityFromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityJidentityFromUnescapedOrThrowUnchecked(java.lang.CharSequence cs, JxmppContext context)LikeentityFromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityJidentityFromUrlEncoded(java.lang.CharSequence cs)Get aEntityJidfrom an URL encoded CharSequence.static EntityFullJidentityFullFrom(java.lang.CharSequence jid)Get aEntityFullJidrepresenting the given CharSequence.static EntityFullJidentityFullFrom(java.lang.CharSequence localpart, Domainpart domainpart, java.lang.CharSequence resource)Get aEntityFullJidconstructed from the given parts.static EntityFullJidentityFullFrom(java.lang.String localpart, java.lang.String domainpart, java.lang.String resource)Get aEntityFullJidconstructed from the given parts.static EntityFullJidentityFullFrom(java.lang.String localpart, java.lang.String domainpart, java.lang.String resource, JxmppContext context)Get aEntityFullJidconstructed from the given parts.static EntityFullJidentityFullFrom(java.lang.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 EntityFullJidentityFullFromOrNull(java.lang.CharSequence cs)static EntityFullJidentityFullFromOrThrowUnchecked(java.lang.CharSequence cs)LikeentityFullFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityFullJidentityFullFromUnescaped(java.lang.CharSequence unescapedJid)Get aEntityFullJidrepresenting the given unescaped CharSequence.static EntityFullJidentityFullFromUnescaped(java.lang.String unescapedJidString)Get aEntityFullJidrepresenting the given unescaped String.static EntityFullJidentityFullFromUnescaped(java.lang.String unescapedJidString, JxmppContext context)Get aEntityFullJidrepresenting the given unescaped String.static EntityFullJidentityFullFromUnescapedOrNull(java.lang.CharSequence cs)static EntityFullJidentityFullFromUnescapedOrThrowUnchecked(java.lang.CharSequence cs)LikeentityFullFromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static EntityFullJidentityFullFromUrlEncoded(java.lang.CharSequence cs)Get aEntityFullJidfrom an URL encoded CharSequence.static Jidfrom(java.lang.CharSequence jid)Get aJidfrom a CharSequence.static Jidfrom(java.lang.CharSequence localpart, java.lang.CharSequence domainpart, java.lang.CharSequence resource)Get aJidfrom the given parts.static Jidfrom(java.lang.String jidString)Get aJidfrom the given String.static Jidfrom(java.lang.String localpart, java.lang.String domainpart, java.lang.String resource)Get aJidfrom the given parts.static Jidfrom(java.lang.String localpart, java.lang.String domainpart, java.lang.String resource, JxmppContext context)Get aJidfrom the given parts.static Jidfrom(java.lang.String jidString, JxmppContext context)Get aJidfrom the given String.static JidfromOrNull(java.lang.CharSequence cs)static JidfromOrThrowUnchecked(java.lang.CharSequence cs)Likefrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static JidfromUnescaped(java.lang.CharSequence unescapedJid)Get aJidfrom the given unescaped CharSequence.static JidfromUnescaped(java.lang.String unescapedJidString)Get aJidfrom the given unescaped String.static JidfromUnescapedOrNull(java.lang.CharSequence cs)static JidfromUnescapedOrThrowUnchecked(java.lang.CharSequence cs)LikefromUnescaped(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static JidfromUrlEncoded(java.lang.CharSequence cs)Get aJidfrom an URL encoded CharSequence.static FullJidfullFrom(java.lang.CharSequence jid)Get aFullJidrepresenting the given CharSequence.static FullJidfullFrom(java.lang.String jid)Get aFullJidrepresenting the given String.static FullJidfullFrom(java.lang.String localpart, java.lang.String domainpart, java.lang.String resource)Get aFullJidconstructed from the given parts.static FullJidfullFrom(java.lang.String localpart, java.lang.String domainpart, java.lang.String resource, JxmppContext context)Get aFullJidconstructed from the given parts.static FullJidfullFrom(java.lang.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 FullJidfullFromOrNull(java.lang.CharSequence cs)static FullJidfullFromOrThrowUnchecked(java.lang.CharSequence cs)LikefullFrom(CharSequence)but does throw an uncheckedIllegalArgumentExceptioninstead of aXmppStringprepException.static FullJidfullFromUrlEncoded(java.lang.CharSequence cs)Get aFullJidfrom an URL encoded CharSequence.
-
-
-
Method Detail
-
from
public static Jid from(java.lang.CharSequence localpart, java.lang.CharSequence domainpart, java.lang.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(java.lang.String localpart, java.lang.String domainpart, java.lang.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(java.lang.String localpart, java.lang.String domainpart, java.lang.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
public static Jid fromOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
from(String)
-
from
public static Jid from(java.lang.CharSequence jid) throws XmppStringprepException
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(String)
-
from
public static Jid from(java.lang.String jidString) throws XmppStringprepException
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(CharSequence)
-
from
public static Jid from(java.lang.String jidString, JxmppContext context) throws XmppStringprepException
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:
from(CharSequence)
-
fromOrNull
public static Jid fromOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
fromUnescapedOrThrowUnchecked
public static Jid fromUnescapedOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
fromUnescaped(CharSequence)
-
fromUnescaped
public static Jid fromUnescaped(java.lang.CharSequence unescapedJid) throws XmppStringprepException
Get aJidfrom the given unescaped CharSequence.- Parameters:
unescapedJid- an unescaped CharSequence representing a JID.- Returns:
- a JID.
- Throws:
XmppStringprepException- if an error occurs.
-
fromUnescaped
public static Jid fromUnescaped(java.lang.String unescapedJidString) throws XmppStringprepException
Get aJidfrom the given unescaped String.- Parameters:
unescapedJidString- a unescaped String representing a JID.- Returns:
- a JID.
- Throws:
XmppStringprepException- if an error occurs.
-
fromUnescapedOrNull
public static Jid fromUnescapedOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
fromUrlEncoded
public static Jid fromUrlEncoded(java.lang.CharSequence cs) throws XmppStringprepException
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:
URLDecoder
-
bareFromOrThrowUnchecked
public static BareJid bareFromOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
bareFrom(CharSequence)
-
bareFrom
public static BareJid bareFrom(java.lang.CharSequence jid) throws XmppStringprepException
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
public static BareJid bareFrom(java.lang.String jid) throws XmppStringprepException
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
public static BareJid bareFrom(java.lang.String jid, JxmppContext context) throws XmppStringprepException
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
public static BareJid bareFrom(Localpart localpart, DomainBareJid domainBareJid)
- Parameters:
localpart- a optional localpart.domainBareJid- a domain bare JID.- Returns:
- a bare JID.
-
bareFrom
public static BareJid bareFrom(Localpart localpart, Domainpart domain)
- Parameters:
localpart- a optional localpart.domain- a domainpart.- Returns:
- a bare JID constructed from the given parts.
-
bareFromOrNull
public static BareJid bareFromOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
bareFromUrlEncoded
public static BareJid bareFromUrlEncoded(java.lang.CharSequence cs) throws XmppStringprepException
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:
URLDecoder
-
fullFromOrThrowUnchecked
public static FullJid fullFromOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
fullFrom(CharSequence)
-
fullFrom
public static FullJid fullFrom(java.lang.CharSequence jid) throws XmppStringprepException
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
public static FullJid fullFrom(java.lang.String jid) throws XmppStringprepException
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
public static FullJid fullFrom(java.lang.String jid, JxmppContext context) throws XmppStringprepException
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(java.lang.String localpart, java.lang.String domainpart, java.lang.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(java.lang.String localpart, java.lang.String domainpart, java.lang.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
public static FullJid fullFrom(Localpart localpart, Domainpart domainpart, Resourcepart resource)
Get aFullJidconstructed from the given parts.- Parameters:
localpart- the optional localpart.domainpart- the domainpart.resource- the resourcepart.- Returns:
- a full JID.
-
fullFrom
public static FullJid fullFrom(BareJid bareJid, Resourcepart resource)
- Parameters:
bareJid- a entity bare JID.resource- a resourcepart.- Returns:
- a full JID.
-
fullFromOrNull
public static FullJid fullFromOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
fullFromUrlEncoded
public static FullJid fullFromUrlEncoded(java.lang.CharSequence cs) throws XmppStringprepException
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:
URLDecoder
-
entityFromOrThrowUnchecked
public static EntityJid entityFromOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
entityFrom(CharSequence)
-
entityFrom
public static EntityJid entityFrom(java.lang.CharSequence jid) throws XmppStringprepException
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
public static EntityJid entityFrom(java.lang.String jidString) throws XmppStringprepException
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(java.lang.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
public static EntityJid entityFromUnescapedOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
entityFromUnescaped(CharSequence)
-
entityFromUnescapedOrThrowUnchecked
public static EntityJid entityFromUnescapedOrThrowUnchecked(java.lang.CharSequence cs, JxmppContext context)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
entityFromUnescaped(CharSequence)
-
entityFromUnescaped
public static EntityJid entityFromUnescaped(java.lang.CharSequence jid) throws XmppStringprepException
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(java.lang.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
public static EntityJid entityFromUnescaped(java.lang.String jidString) throws XmppStringprepException
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(java.lang.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 public static EntityJid entityFromUnesacpedOrNull(java.lang.CharSequence cs)
Deprecated.useentityFromUnescapedOrNull(CharSequence)instead.- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
entityFromUnescapedOrNull
public static EntityJid entityFromUnescapedOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
entityFromOrNull
public static EntityJid entityFromOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
entityFromUrlEncoded
public static EntityJid entityFromUrlEncoded(java.lang.CharSequence cs) throws XmppStringprepException
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:
URLDecoder
-
entityBareFromOrThrowUnchecked
public static EntityBareJid entityBareFromOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
entityBareFrom(CharSequence)
-
entityBareFrom
public static EntityBareJid entityBareFrom(java.lang.CharSequence jid) throws XmppStringprepException
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
public static EntityBareJid entityBareFrom(java.lang.String jid) throws XmppStringprepException
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(java.lang.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
public static EntityBareJid entityBareFromUnescapedOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
entityBareFromUnescaped(CharSequence)
-
entityBareFromUnescaped
public static EntityBareJid entityBareFromUnescaped(java.lang.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(java.lang.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(java.lang.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
public static EntityBareJid entityBareFromUnescapedOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
entityBareFrom
public static EntityBareJid entityBareFrom(Localpart localpart, DomainBareJid domainBareJid)
Get aEntityBareJidconstructed from the givenLocalpartand {link DomainBareJid}.- Parameters:
localpart- a localpart.domainBareJid- a domain bare JID.- Returns:
- a bare JID.
-
entityBareFrom
public static EntityBareJid entityBareFrom(Localpart localpart, Domainpart domain)
- Parameters:
localpart- a localpart.domain- a domainpart.- Returns:
- a bare JID constructed from the given parts.
-
entityBareFrom
public static EntityBareJid entityBareFrom(java.lang.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
public static EntityBareJid entityBareFromOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
entityBareFromUrlEncoded
public static EntityBareJid entityBareFromUrlEncoded(java.lang.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:
URLDecoder
-
entityFullFromOrThrowUnchecked
public static EntityFullJid entityFullFromOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
entityFullFrom(CharSequence)
-
entityFullFrom
public static EntityFullJid entityFullFrom(java.lang.CharSequence jid) throws XmppStringprepException
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(java.lang.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
public static EntityFullJid entityFullFromOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
entityFullFromUnescapedOrThrowUnchecked
public static EntityFullJid entityFullFromUnescapedOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
entityFullFromUnescaped(CharSequence)
-
entityFullFromUnescaped
public static EntityFullJid entityFullFromUnescaped(java.lang.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(java.lang.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(java.lang.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
public static EntityFullJid entityFullFromUnescapedOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
entityFullFrom
public static EntityFullJid entityFullFrom(java.lang.String localpart, java.lang.String domainpart, java.lang.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(java.lang.String localpart, java.lang.String domainpart, java.lang.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(java.lang.CharSequence localpart, Domainpart domainpart, java.lang.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
public static EntityFullJid entityFullFrom(EntityBareJid bareJid, Resourcepart resource)
- Parameters:
bareJid- a bare JID.resource- a resourcepart.- Returns:
- a full JID.
-
entityFullFromUrlEncoded
public static EntityFullJid entityFullFromUrlEncoded(java.lang.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:
URLDecoder
-
domainBareFromOrThrowUnchecked
public static DomainBareJid domainBareFromOrThrowUnchecked(java.lang.CharSequence cs)
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:
from(String)
-
domainBareFrom
public static DomainBareJid domainBareFrom(java.lang.CharSequence jid) throws XmppStringprepException
Get a domain bare JID.- Parameters:
jid- the JID CharSequence.- Returns:
- a domain bare JID.
- Throws:
XmppStringprepException- if an error occurs.
-
domainBareFrom
public static DomainBareJid domainBareFrom(java.lang.String jid) throws XmppStringprepException
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(java.lang.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
public static DomainBareJid domainBareFrom(Domainpart domainpart)
Get aDomainBareJidconsisting of the givenDomainpart.- Parameters:
domainpart- the domainpart.- Returns:
- a domain bare JID.
-
domainBareFromOrNull
public static DomainBareJid domainBareFromOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
domainBareFromUrlEncoded
public static DomainBareJid domainBareFromUrlEncoded(java.lang.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:
URLDecoder
-
domainFullFromOrThrowUnchecked
public static DomainFullJid domainFullFromOrThrowUnchecked(java.lang.CharSequence cs)
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:
java.lang.IllegalArgumentException- if the given input is not a valid JID- Since:
- 0.6.2
- See Also:
domainFullFrom(CharSequence)
-
domainFullFrom
public static DomainFullJid domainFullFrom(java.lang.CharSequence jid) throws XmppStringprepException
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
public static DomainFullJid domainFullFrom(java.lang.String jid) throws XmppStringprepException
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(java.lang.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
public static DomainFullJid domainFullFrom(Domainpart domainpart, Resourcepart resource)
Get a domain full JID.- Parameters:
domainpart- the domainpart.resource- the resourcepart.- Returns:
- a domain full JID.
-
domainFullFrom
public static DomainFullJid domainFullFrom(DomainBareJid domainBareJid, Resourcepart resource)
Get a domain full JID.- Parameters:
domainBareJid- a domain bare JID.resource- a resourcepart.- Returns:
- a domain full JID.
-
domainFullFromOrNull
public static DomainFullJid domainFullFromOrNull(java.lang.CharSequence cs)
- Parameters:
cs- the inputCharSequence- Returns:
- a JID or
null
-
domainFullFromUrlEncoded
public static DomainFullJid domainFullFromUrlEncoded(java.lang.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:
URLDecoder
-
-