Package tigase.util.stringprep

## Class XMPPStringPrepFactory

- java.lang.Object
- - tigase.util.stringprep.XMPPStringPrepFactory

-     public abstract class XMPPStringPrepFactory
      extends java.lang.Object

  Created: Dec 28, 2009 10:02:31 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `STRINGPREP_PROCESSOR` |
    `static java.lang.String` | `STRINGPREP_PROCESSOR_PROP_KEY` |
    `static java.lang.String[]` | `STRINGPREP_PROCESSORS` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `XMPPStringPrepFactory()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static XMPPStringPrepIfc` | `getDefaultXMPPStringPrep()` | Factory method for creating and returning stringprep implementation used by the Tigase server.
    `static XMPPStringPrepIfc` | `getEmptyXMPPStringPrep()` | Factory method for creating and returning stringprep implementation used by the Tigase server.
    `static XMPPStringPrepIfc` | `getLibIDNXMPPStringPrep()` | Factory method for creating and returning stringprep implementation used by the Tigase server.
    `static XMPPStringPrepIfc` | `getSimpleXMPPStringPrep()` | Factory method for creating and returning stringprep implementation used by the Tigase server.
    `static XMPPStringPrepIfc` | `getXMPPStringPrep​(java.lang.String stringprepProcessor)` |
    `static void` | `main​(java.lang.String[] args)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### STRINGPREP_PROCESSOR_PROP_KEY

          public static final java.lang.String STRINGPREP_PROCESSOR_PROP_KEY

      See Also:
        Constant Field Values

    - #### STRINGPREP_PROCESSORS

          public static final java.lang.String[] STRINGPREP_PROCESSORS

    - #### STRINGPREP_PROCESSOR

          public static java.lang.String STRINGPREP_PROCESSOR

  - ### Constructor Detail

    - #### XMPPStringPrepFactory

          public XMPPStringPrepFactory()

  - ### Method Detail

    - #### getDefaultXMPPStringPrep

          public static XMPPStringPrepIfc getDefaultXMPPStringPrep()

      Factory method for creating and returning stringprep implementation used by the Tigase server. This factory allows for pluggable stringprep library usage and replacing the library used by default. The default stringprep processor uses LibIDN library. Very CPU demanding processing. Use with care in open, multi-lingual systems.
      Returns:
        instance of XMPP Stringprep processor.

    - #### getEmptyXMPPStringPrep

          public static XMPPStringPrepIfc getEmptyXMPPStringPrep()

      Factory method for creating and returning stringprep implementation used by the Tigase server. This factory allows for pluggable stringprep library usage and replacing the library used by default. The empty stringprep processor does not perform any processing at all. It simply returns the string provided to the method. Recommended only in strictly controlled systems where there is no possibility of incorrectly formated JID getting to the system and the performance is the ke factor. uses simple Java `String` processing.
      Returns:
        instance of XMPP Stringprep processor.

    - #### getLibIDNXMPPStringPrep

          public static XMPPStringPrepIfc getLibIDNXMPPStringPrep()

      Factory method for creating and returning stringprep implementation used by the Tigase server. This factory allows for pluggable stringprep library usage and replacing the library used by default. The stringprep processor uses LibIDN library. Very CPU demanding processing. Use in open, multi-lingual systems.
      Returns:
        instance of XMPP Stringprep processor.

    - #### getSimpleXMPPStringPrep

          public static XMPPStringPrepIfc getSimpleXMPPStringPrep()

      Factory method for creating and returning stringprep implementation used by the Tigase server. This factory allows for pluggable stringprep library usage and replacing the library used by default. The simple stringprep processor uses simple Java `String` processing. Recommended in relatively closed, single language systems where there is very low probability for in correct JIDs. Causes very low impact on performance.
      Returns:
        instance of XMPP Stringprep processor.

    - #### getXMPPStringPrep

          public static XMPPStringPrepIfc getXMPPStringPrep​(java.lang.String stringprepProcessor)

    - #### main

          public static void main​(java.lang.String[] args)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`