Package org.jxmpp.jid.impl
Class LocalDomainAndResourcepartJid
java.lang.Object
org.jxmpp.jid.impl.AbstractJid
org.jxmpp.jid.impl.LocalDomainAndResourcepartJid
- All Implemented Interfaces:
Serializable
,CharSequence
,Comparable<Jid>
,EntityFullJid
,EntityJid
,FullJid
,Jid
- See Also:
-
Field Summary
Fields inherited from class org.jxmpp.jid.impl.AbstractJid
cache
-
Method Summary
Modifier and TypeMethodDescriptionReturn a JID created by removing the Resourcepart from this JID.Convert this Jid to aDomainBareJid
.Convert this Jid to aDomainFullJid
if possible.Return the bare JID of this entity JID.Convert this Jid to aEntityBareJid
if possible.Return the bare JID string of this full JID.Convert this Jid to aEntityFullJid
if possible.Convert this Jid to aEntityJid
if possible.Convert this Jid to aFullJid
if possible.Return the unescaped String representation of this JID.Get theDomainpart
of this Jid.Return theLocalpart
of this JID.Get the localpart of this JID or null.Get the resourcepart of this JID or null.Return theResourcepart
of this JID.boolean
Check if this is an instance ofEntityBareJid
orDomainBareJid
.boolean
isParentOf
(DomainBareJid domainBareJid) SeeJid.isParentOf(Jid)
.boolean
isParentOf
(DomainFullJid domainFullJid) SeeJid.isParentOf(Jid)
.boolean
isParentOf
(EntityBareJid bareJid) SeeJid.isParentOf(Jid)
.boolean
isParentOf
(EntityFullJid fullJid) SeeJid.isParentOf(Jid)
.boolean
isStrictParentOf
(DomainBareJid domainBareJid) boolean
isStrictParentOf
(DomainFullJid domainFullJid) boolean
isStrictParentOf
(EntityBareJid bareJid) SeeJid.isParentOf(Jid)
.boolean
isStrictParentOf
(EntityFullJid fullJid) toString()
Returns the String representation of this JID.Methods inherited from class org.jxmpp.jid.impl.AbstractJid
asDomainFullJidOrThrow, asEntityBareJidOrThrow, asEntityFullJidOrThrow, asEntityJidOrThrow, asFullJidOrThrow, asUrlEncodedString, charAt, compareTo, downcast, equals, equals, equals, getLocalpartOrThrow, getResourceOrEmpty, getResourceOrThrow, hashCode, hasLocalpart, hasResource, intern, isDomainBareJid, isDomainFullJid, isEntityBareJid, isEntityFullJid, isEntityJid, isParentOf, isStrictParentOf, length, subSequence
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
charAt, chars, codePoints, length, subSequence
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.jxmpp.jid.Jid
asDomainFullJidOrThrow, asEntityBareJidOrThrow, asEntityFullJidOrThrow, asEntityJidOrThrow, asFullJidOrThrow, asUrlEncodedString, downcast, equals, equals, getLocalpartOrThrow, getResourceOrEmpty, getResourceOrThrow, hasLocalpart, hasResource, intern, isDomainBareJid, isDomainFullJid, isEntityBareJid, isEntityFullJid, isEntityJid, isParentOf, isStrictParentOf
-
Method Details
-
toString
Description copied from interface:Jid
Returns the String representation of this JID. -
asUnescapedString
Description copied from interface:Jid
Return the unescaped String representation of this JID.Since certain Unicode code points are disallowed in the localpart of a JID by the required stringprep profile, those need to get escaped when used in a real JID. The unescaped representation of the JID is only for presentation to a human user or for gatewaying to a non-XMPP system.
For example, if the users inputs'at&t guy@example.com'
, the escaped real JID created withJidCreate
will be'at\26t\20guy@example.com'
, which is whatJid.toString()
will return. ButJid.asUnescapedString()
will return again'at&t guy@example.com'
.- Specified by:
asUnescapedString
in interfaceJid
- Returns:
- the unescaped String representation of this JID.
-
asEntityBareJid
Description copied from interface:EntityJid
Return the bare JID of this entity JID.- Specified by:
asEntityBareJid
in interfaceEntityJid
- Returns:
- the bare JID.
-
asEntityBareJidString
Description copied from interface:EntityJid
Return the bare JID string of this full JID.- Specified by:
asEntityBareJidString
in interfaceEntityJid
- Returns:
- the bare JID string.
-
hasNoResource
Description copied from interface:Jid
Check if this is an instance ofEntityBareJid
orDomainBareJid
.- Specified by:
hasNoResource
in interfaceJid
- Specified by:
hasNoResource
in classAbstractJid
- Returns:
- true if this is an instance of BareJid or DomainBareJid
-
asEntityBareJidIfPossible
Description copied from interface:Jid
Convert this Jid to aEntityBareJid
if possible.- Specified by:
asEntityBareJidIfPossible
in interfaceJid
- Returns:
- the corresponding
EntityBareJid
or null.
-
asEntityFullJidIfPossible
Description copied from interface:Jid
Convert this Jid to aEntityFullJid
if possible.- Specified by:
asEntityFullJidIfPossible
in interfaceJid
- Returns:
- the corresponding
EntityFullJid
or null.
-
asDomainFullJidIfPossible
Description copied from interface:Jid
Convert this Jid to aDomainFullJid
if possible.- Specified by:
asDomainFullJidIfPossible
in interfaceJid
- Returns:
- the corresponding DomainFullJid or null.
-
getLocalpartOrNull
Description copied from interface:Jid
Get the localpart of this JID or null.If the JID is of form
<localpart@domain.example>
then this method returns 'localpart'. If the JID has no localpart, thennull
is returned.- Specified by:
getLocalpartOrNull
in interfaceJid
- Specified by:
getLocalpartOrNull
in classAbstractJid
- Returns:
- the localpart of this JID or null.
-
getResourceOrNull
Description copied from interface:Jid
Get the resourcepart of this JID or null.If the JID is of form
<localpart@domain.example/resource>
then this method returns 'resource'. If the JID no resourcepart, thennull
is returned.- Specified by:
getResourceOrNull
in interfaceJid
- Specified by:
getResourceOrNull
in classAbstractJid
- Returns:
- the resource of this JID or null.
-
isParentOf
Description copied from interface:Jid
SeeJid.isParentOf(Jid)
.- Specified by:
isParentOf
in interfaceJid
- Parameters:
bareJid
- the bare JID.- Returns:
- true if this JID is a parent of the given JID.
-
isParentOf
Description copied from interface:Jid
SeeJid.isParentOf(Jid)
.- Specified by:
isParentOf
in interfaceJid
- Parameters:
fullJid
- the full JID.- Returns:
- true if this JID is a parent of the given JID.
-
isParentOf
Description copied from interface:Jid
SeeJid.isParentOf(Jid)
.- Specified by:
isParentOf
in interfaceJid
- Parameters:
domainBareJid
- the domain bare JID.- Returns:
- true if this JID is a parent of the given JID.
-
isParentOf
Description copied from interface:Jid
SeeJid.isParentOf(Jid)
.- Specified by:
isParentOf
in interfaceJid
- Parameters:
domainFullJid
- the domain full JID.- Returns:
- true if this JID is a parent of the given JID.
-
isStrictParentOf
Description copied from interface:Jid
SeeJid.isParentOf(Jid)
.- Specified by:
isStrictParentOf
in interfaceJid
- Parameters:
bareJid
- the bare JID.- Returns:
- true if this JID is a parent of the given JID.
-
isStrictParentOf
Description copied from interface:Jid
- Specified by:
isStrictParentOf
in interfaceJid
- Parameters:
fullJid
- the full JID.- Returns:
- true if this JID is a parent of the given JID.
-
isStrictParentOf
Description copied from interface:Jid
- Specified by:
isStrictParentOf
in interfaceJid
- Parameters:
domainBareJid
- the domain bare JID.- Returns:
- true if this JID is a parent of the given JID.
-
isStrictParentOf
Description copied from interface:Jid
- Specified by:
isStrictParentOf
in interfaceJid
- Parameters:
domainFullJid
- the domain full JID.- Returns:
- true if this JID is a parent of the given JID.
-
asDomainBareJid
Description copied from interface:Jid
Convert this Jid to aDomainBareJid
.Note that it is always possible to convert a Jid to a DomainBareJid, since every Jid has a domain part.
- Specified by:
asDomainBareJid
in interfaceJid
- Returns:
- the corresponding DomainBareJid.
-
getResourcepart
Description copied from interface:FullJid
Return theResourcepart
of this JID.- Specified by:
getResourcepart
in interfaceFullJid
- Returns:
- the resourcepart.
-
asBareJid
Description copied from interface:Jid
Return a JID created by removing the Resourcepart from this JID. -
getDomain
Description copied from interface:Jid
Get theDomainpart
of this Jid. -
getLocalpart
Description copied from interface:EntityJid
Return theLocalpart
of this JID.- Specified by:
getLocalpart
in interfaceEntityJid
- Returns:
- the localpart.
-
asEntityJidIfPossible
Description copied from interface:Jid
Convert this Jid to aEntityJid
if possible.- Specified by:
asEntityJidIfPossible
in interfaceJid
- Returns:
- the corresponding
EntityJid
or null.
-
asFullJidIfPossible
Description copied from interface:Jid
Convert this Jid to aFullJid
if possible.- Specified by:
asFullJidIfPossible
in interfaceJid
- Returns:
- the corresponding
FullJid
or null.
-