Package org.jxmpp.stringprep.simple
Class SimpleXmppStringprep
- java.lang.Object
-
- org.jxmpp.stringprep.simple.SimpleXmppStringprep
-
- All Implemented Interfaces:
XmppStringprep
public final class SimpleXmppStringprep extends java.lang.Object implements XmppStringprep
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdomainprep(java.lang.String string)Performs String preparation on the domainpart String of a JID.static voidensureLocalpartDoesNotIncludeFurtherExcludedCharacters(java.lang.String localpart)Ensure that the input string does not contain any of the further excluded characters of XMPP localparts.static SimpleXmppStringprepgetInstance()Get the Simple XMPP Stringprep singleton.java.lang.Stringlocalprep(java.lang.String string)Performs String preparation on the localpart String of a JID.java.lang.Stringresourceprep(java.lang.String string)Performs String preparation on the resourcepart String of a JID.static voidsetup()Setup Simple XMPP Stringprep as implementation to use.
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
setup
public static void setup()
Setup Simple XMPP Stringprep as implementation to use.
-
getInstance
public static SimpleXmppStringprep getInstance()
Get the Simple XMPP Stringprep singleton.- Returns:
- the simple XMPP Stringprep singleton.
-
localprep
public java.lang.String localprep(java.lang.String string) throws XmppStringprepExceptionDescription copied from interface:XmppStringprepPerforms String preparation on the localpart String of a JID. In RFC 6122 terms this means applying the nodeprep profile of Stringprep.- Specified by:
localprepin interfaceXmppStringprep- Parameters:
string- the String to transform.- Returns:
- the prepared String.
- Throws:
XmppStringprepException- if there is an error.
-
ensureLocalpartDoesNotIncludeFurtherExcludedCharacters
public static void ensureLocalpartDoesNotIncludeFurtherExcludedCharacters(java.lang.String localpart) throws XmppStringprepExceptionEnsure that the input string does not contain any of the further excluded characters of XMPP localparts.- Parameters:
localpart- the input string.- Throws:
XmppStringprepException- if one of the further excluded characters is found.- See Also:
- RFC 7622 ยง 3.3.1
-
domainprep
public java.lang.String domainprep(java.lang.String string) throws XmppStringprepExceptionDescription copied from interface:XmppStringprepPerforms String preparation on the domainpart String of a JID. In RFC 61ss terms, this means applying the nameprep profile of Stringprep.- Specified by:
domainprepin interfaceXmppStringprep- Parameters:
string- the String to transform.- Returns:
- the prepared String.
- Throws:
XmppStringprepException- if there is an error.
-
resourceprep
public java.lang.String resourceprep(java.lang.String string) throws XmppStringprepExceptionDescription copied from interface:XmppStringprepPerforms String preparation on the resourcepart String of a JID. In RFC 6122 terms this means applying the resourceprep profile of Stringprep.- Specified by:
resourceprepin interfaceXmppStringprep- Parameters:
string- the String to transform.- Returns:
- the prepared String.
- Throws:
XmppStringprepException- if there is an error.
-
-