Class Identity

  • All Implemented Interfaces:
    Comparable<Identity>, LanguageElement

    public final class Identity
    extends Object
    implements LanguageElement, Comparable<Identity>
    Represents an identity of an XMPP entity.

    3. Discovering Information About a Jabber Entity

    In disco, an entity's identity is broken down into its category (server, client, gateway, directory, etc.) and its particular type within that category (IM server, phone vs. handheld client, MSN gateway vs. AIM gateway, user directory vs. chatroom directory, etc.). This information helps requesting entities to determine the group or "bucket" of services into which the entity is most appropriately placed (e.g., perhaps the entity is shown in a GUI with an appropriate icon). An entity MAY have multiple identities. When multiple identity elements are provided, the name attributes for each identity element SHOULD have the same value.

    This class is immutable.

    See Also:
    Service Discovery Identities
    • Method Detail

      • ofCategoryAndType

        public static Identity ofCategoryAndType​(String category,
                                                 String type)
        Creates an identity with a category and type.

        Only use this method in exceptional cases, in most case you should use one of the many static factory methods, which creates a registered identity, e.g. clientBot().

        Parameters:
        category - The category.
        type - The type.
        Returns:
        The identity.
      • accountAdmin

        public static Identity accountAdmin()
        The user@host is an administrative account.
        Returns:
        The identity.
      • accountAnonymous

        public static Identity accountAnonymous()
        The user@host is a "guest" account that allows anonymous login by any user.
        Returns:
        The identity.
      • accountRegistered

        public static Identity accountRegistered()
        The user@host is a registered or provisioned account associated with a particular non-administrative user.
        Returns:
        The identity.
      • authCert

        public static Identity authCert()
        A server component that authenticates based on external certificates.
        Returns:
        The identity.
      • authGeneric

        public static Identity authGeneric()
        A server authentication component other than one of the registered types.
        Returns:
        The identity.
      • authLdap

        public static Identity authLdap()
        A server component that authenticates against an LDAP database.
        Returns:
        The identity.
      • authNtlm

        public static Identity authNtlm()
        A server component that authenticates against an NT domain.
        Returns:
        The identity.
      • authPam

        public static Identity authPam()
        A server component that authenticates against a PAM system.
        Returns:
        The identity.
      • automationCommandList

        public static Identity automationCommandList()
        The node for a list of commands; valid only for the node "http://jabber.org/protocol/commands".
        Returns:
        The identity.
      • automationCommandNode

        public static Identity automationCommandNode()
        A node for a specific command; the "node" attribute uniquely identifies the command.
        Returns:
        The identity.
      • automationRpc

        public static Identity automationRpc()
        An entity that supports Jabber-RPC.
        Returns:
        The identity.
      • automationSoap

        public static Identity automationSoap()
        An entity that supports the SOAP XMPP Binding.
        Returns:
        The identity.
      • automationTranslation

        public static Identity automationTranslation()
        An entity that provides automated translation services.
        Returns:
        The identity.
      • clientBot

        public static Identity clientBot()
        An automated client that is not controlled by a human user.
        Returns:
        The identity.
      • clientConsole

        public static Identity clientConsole()
        Minimal non-GUI client used on dumb terminals or text-only screens.
        Returns:
        The identity.
      • clientGame

        public static Identity clientGame()
        A client running on a gaming console.
        Returns:
        The identity.
      • clientHandheld

        public static Identity clientHandheld()
        A client running on a PDA, RIM device, or other handheld.
        Returns:
        The identity.
      • clientPc

        public static Identity clientPc()
        Standard full-GUI client used on desktops and laptops.
        Returns:
        The identity.
      • clientPhone

        public static Identity clientPhone()
        A client running on a mobile phone or other telephony device.
        Returns:
        The identity.
      • clientSms

        public static Identity clientSms()
        A client that is not actually using an instant messaging client; however, messages sent to this contact will be delivered as Short Message Service (SMS) messages.
        Returns:
        The identity.
      • clientWeb

        public static Identity clientWeb()
        A client operated from within a web browser.
        Returns:
        The identity.
      • collaborationWhiteboard

        public static Identity collaborationWhiteboard()
        Multi-user whiteboarding service.
        Returns:
        The identity.
      • componentArchive

        public static Identity componentArchive()
        A server component that archives traffic.
        Returns:
        The identity.
      • componentClientToServer

        public static Identity componentClientToServer()
        A server component that handles client connections.
        Returns:
        The identity.
      • componentGeneric

        public static Identity componentGeneric()
        A server component other than one of the registered types.
        Returns:
        The identity.
      • componentLoadBalancing

        public static Identity componentLoadBalancing()
        A server component that handles load balancing.
        Returns:
        The identity.
      • componentLog

        public static Identity componentLog()
        A server component that logs server information.
        Returns:
        The identity.
      • componentPresence

        public static Identity componentPresence()
        A server component that provides presence information.
        Returns:
        The identity.
      • componentRouter

        public static Identity componentRouter()
        A server component that handles core routing logic.
        Returns:
        The identity.
      • componentServerToServer

        public static Identity componentServerToServer()
        A server component that handles server connections.
        Returns:
        The identity.
      • componentSessionManagement

        public static Identity componentSessionManagement()
        A server component that manages user sessions.
        Returns:
        The identity.
      • componentStatistics

        public static Identity componentStatistics()
        A server component that provides server statistics.
        Returns:
        The identity.
      • conferenceIrc

        public static Identity conferenceIrc()
        Internet Relay Chat service.
        Returns:
        The identity.
      • conferenceText

        public static Identity conferenceText()
        Text conferencing service.
        Returns:
        The identity.
      • directoryChatRoom

        public static Identity directoryChatRoom()
        A directory of chatrooms.
        Returns:
        The identity.
      • directoryGroup

        public static Identity directoryGroup()
        A directory that provides shared roster groups.
        Returns:
        The identity.
      • directoryUser

        public static Identity directoryUser()
        A directory of end users (e.g., JUD).
        Returns:
        The identity.
      • directoryWaitingList

        public static Identity directoryWaitingList()
        A directory of waiting list entries.
        Returns:
        The identity.
      • gatewayAIM

        public static Identity gatewayAIM()
        Gateway to AOL Instant Messenger.
        Returns:
        The identity.
      • gatewayFacebook

        public static Identity gatewayFacebook()
        Gateway to the Facebook IM service.
        Returns:
        The identity.
      • gatewayGaduGadu

        public static Identity gatewayGaduGadu()
        Gateway to the Gadu-Gadu IM service.
        Returns:
        The identity.
      • gatewayHttpWs

        public static Identity gatewayHttpWs()
        Gateway that provides HTTP Web Services access.
        Returns:
        The identity.
      • gatewayICQ

        public static Identity gatewayICQ()
        Gateway to ICQ.
        Returns:
        The identity.
      • gatewayIRC

        public static Identity gatewayIRC()
        Gateway to IRC.
        Returns:
        The identity.
      • gatewayLCS

        public static Identity gatewayLCS()
        Gateway to Microsoft Live Communications Server.
        Returns:
        The identity.
      • gatewayMSN

        public static Identity gatewayMSN()
        Gateway to MSN Messenger.
        Returns:
        The identity.
      • gatewayMySpaceIM

        public static Identity gatewayMySpaceIM()
        Gateway to the MySpace IM service.
        Returns:
        The identity.
      • gatewayOCS

        public static Identity gatewayOCS()
        Gateway to Microsoft Office Communications Server.
        Returns:
        The identity.
      • gatewayQQ

        public static Identity gatewayQQ()
        Gateway to the QQ IM service.
        Returns:
        The identity.
      • gatewaySametime

        public static Identity gatewaySametime()
        Gateway to IBM Lotus Sametime.
        Returns:
        The identity.
      • gatewaySimple

        public static Identity gatewaySimple()
        Gateway to SIP for Instant Messaging and Presence Leveraging Extensions (SIMPLE).
        Returns:
        The identity.
      • gatewaySkype

        public static Identity gatewaySkype()
        Gateway to the Skype service.
        Returns:
        The identity.
      • gatewaySMS

        public static Identity gatewaySMS()
        Gateway to Short Message Service.
        Returns:
        The identity.
      • gatewaySMTP

        public static Identity gatewaySMTP()
        Gateway to the SMTP (email) network.
        Returns:
        The identity.
      • gatewayTlen

        public static Identity gatewayTlen()
        Gateway to the Tlen IM service.
        Returns:
        The identity.
      • gatewayXfire

        public static Identity gatewayXfire()
        Gateway to the Xfire gaming and IM service.
        Returns:
        The identity.
      • gatewayXMPP

        public static Identity gatewayXMPP()
        Gateway to another XMPP service (NOT via native server-to-server communication).
        Returns:
        The identity.
      • gatewayYahoo

        public static Identity gatewayYahoo()
        Gateway to Yahoo! Instant Messenger.
        Returns:
        The identity.
      • headlineNewMail

        public static Identity headlineNewMail()
        Service that notifies a user of new email messages.
        Returns:
        The identity.
      • headlineRss

        public static Identity headlineRss()
        RSS notification service.
        Returns:
        The identity.
      • headlineWeather

        public static Identity headlineWeather()
        Service that provides weather alerts..
        Returns:
        The identity.
      • hierarchyBranch

        public static Identity hierarchyBranch()
        A service discovery node that contains further nodes in the hierarchy.
        Returns:
        The identity.
      • hierarchyLeaf

        public static Identity hierarchyLeaf()
        A service discovery node that does not contain further nodes in the hierarchy.
        Returns:
        The identity.
      • proxyByteStreams

        public static Identity proxyByteStreams()
        SOCKS5 bytestreams proxy service.
        Returns:
        The identity.
      • pubsubCollection

        public static Identity pubsubCollection()
        A pubsub node of the "collection" type.
        Returns:
        The identity.
      • pubsubLeaf

        public static Identity pubsubLeaf()
        A pubsub node of the "leaf" type.
        Returns:
        The identity.
      • pubsubPersonalEventingService

        public static Identity pubsubPersonalEventingService()
        A personal eventing service that supports the publish-subscribe subset defined in XEP-0163..
        Returns:
        The identity.
      • pubsubService

        public static Identity pubsubService()
        A pubsub service that supports the functionality defined in XEP-0060.
        Returns:
        The identity.
      • serverInstantMessaging

        public static Identity serverInstantMessaging()
        Standard Jabber/XMPP server used for instant messaging and presence.
        Returns:
        The identity.
      • storeBerkeley

        public static Identity storeBerkeley()
        A server component that stores data in a Berkeley database.
        Returns:
        The identity.
      • storeFile

        public static Identity storeFile()
        A server component that stores data on the file system.
        Returns:
        The identity.
      • storeGeneric

        public static Identity storeGeneric()
        A server data storage component other than one of the registered types.
        Returns:
        The identity.
      • storeLdap

        public static Identity storeLdap()
        A server component that stores data in an LDAP database.
        Returns:
        The identity.
      • storeMySQL

        public static Identity storeMySQL()
        A server component that stores data in a MySQL database.
        Returns:
        The identity.
      • storeOracle

        public static Identity storeOracle()
        A server component that stores data in an Oracle database.
        Returns:
        The identity.
      • storePostgreSQL

        public static Identity storePostgreSQL()
        A server component that stores data in a PostgreSQL database.
        Returns:
        The identity.
      • getCategory

        public final String getCategory()
        Gets the category, e.g. server, client, gateway, directory, etc.
        Returns:
        The category.
      • getType

        public final String getType()
        Gets the type within the category, e.g. IM server, phone vs. handheld client, MSN gateway vs. AIM gateway, user directory vs. chatroom directory, etc.
        Returns:
        The type.
      • getName

        public final String getName()
        Gets the identity's name.
        Returns:
        The name
      • equals

        public final boolean equals​(Object o)
        An identity is considered equal, if category, type and language are equal, because there cannot be two identities with the same category, type and language, but with different names.
        Overrides:
        equals in class Object
        Parameters:
        o - The other object.
        Returns:
        True, if category, type and language are equal.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • withName

        public Identity withName​(String name)
        Creates a new identity with a name.
        Parameters:
        name - The name.
        Returns:
        The identity.
      • withName

        public Identity withName​(String name,
                                 Locale language)
        Creates a new identity with a name and a language.
        Parameters:
        name - The name.
        language - The language.
        Returns:
        The identity.