Class LibIdnXmppStringprep

  • All Implemented Interfaces:
    XmppStringprep

    public class LibIdnXmppStringprep
    extends java.lang.Object
    implements XmppStringprep
    XMPP string preparation using libidn.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME
      The name of the stringprep implementation.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String domainprep​(java.lang.String string)
      Performs String preparation on the domainpart String of a JID.
      static LibIdnXmppStringprep getInstance()
      Get the libidn Stringprep implementation singleton.
      java.lang.String localprep​(java.lang.String string)
      Performs String preparation on the localpart String of a JID.
      java.lang.String resourceprep​(java.lang.String string)
      Performs String preparation on the resourcepart String of a JID.
      static void setup()
      Setup the libidn Stringprep implementation as active Stringprep implementation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NAME

        public static final java.lang.String NAME
        The name of the stringprep implementation.
        See Also:
        Constant Field Values
    • Method Detail

      • setup

        public static void setup()
        Setup the libidn Stringprep implementation as active Stringprep implementation.
      • getInstance

        public static LibIdnXmppStringprep getInstance()
        Get the libidn Stringprep implementation singleton.
        Returns:
        the libidn Stringprep implementation.
      • localprep

        public java.lang.String localprep​(java.lang.String string)
                                   throws XmppStringprepException
        Description copied from interface: XmppStringprep
        Performs String preparation on the localpart String of a JID. In RFC 6122 terms this means applying the nodeprep profile of Stringprep.
        Specified by:
        localprep in interface XmppStringprep
        Parameters:
        string - the String to transform.
        Returns:
        the prepared String.
        Throws:
        XmppStringprepException - if there is an error.
      • domainprep

        public java.lang.String domainprep​(java.lang.String string)
                                    throws XmppStringprepException
        Description copied from interface: XmppStringprep
        Performs String preparation on the domainpart String of a JID. In RFC 61ss terms, this means applying the nameprep profile of Stringprep.
        Specified by:
        domainprep in interface XmppStringprep
        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 XmppStringprepException
        Description copied from interface: XmppStringprep
        Performs String preparation on the resourcepart String of a JID. In RFC 6122 terms this means applying the resourceprep profile of Stringprep.
        Specified by:
        resourceprep in interface XmppStringprep
        Parameters:
        string - the String to transform.
        Returns:
        the prepared String.
        Throws:
        XmppStringprepException - if there is an error.