Class Nickname


  • public final class Nickname
    extends Object
    The implementation of the <nick/> element in the http://jabber.org/protocol/nick namespace.

    1. Introduction

    A nickname is a global, memorable (but not necessarily unique) friendly or informal name chosen by the owner of a bare JID <localpart@domain.tld> for the purpose of associating a distinctive mapping between the person's unique JID and non-unique nickname.

    4. Use Cases

    In general, a user SHOULD include his or her nickname when establishing initial communication with a contact or group of contacts (i.e., the user has never been in communication with and does not have a prior relationship with the contact or group of contacts). Appropriate use cases therefore include:

    • Presence subscription requests
    • Message exchange
    This class is immutable.
    See Also:
    XEP-0172: User Nickname, XML Schema
    • Constructor Detail

      • Nickname

        public Nickname​(String value)
        Creates a nick name.
        Parameters:
        value - The actual nick name.
    • Method Detail

      • getValue

        public final String getValue()
        Gets the nick name.
        Returns:
        The nick name.