Class Identity
- java.lang.Object
-
- rocks.xmpp.extensions.disco.model.info.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdentityaccountAdmin()The user@host is an administrative account.static IdentityaccountAnonymous()The user@host is a "guest" account that allows anonymous login by any user.static IdentityaccountRegistered()The user@host is a registered or provisioned account associated with a particular non-administrative user.static IdentityauthCert()A server component that authenticates based on external certificates.static IdentityauthGeneric()A server authentication component other than one of the registered types.static IdentityauthLdap()A server component that authenticates against an LDAP database.static IdentityauthNtlm()A server component that authenticates against an NT domain.static IdentityauthPam()A server component that authenticates against a PAM system.static IdentityautomationCommandList()The node for a list of commands; valid only for the node "http://jabber.org/protocol/commands".static IdentityautomationCommandNode()A node for a specific command; the "node" attribute uniquely identifies the command.static IdentityautomationRpc()An entity that supports Jabber-RPC.static IdentityautomationSoap()An entity that supports the SOAP XMPP Binding.static IdentityautomationTranslation()An entity that provides automated translation services.static IdentityclientBot()An automated client that is not controlled by a human user.static IdentityclientConsole()Minimal non-GUI client used on dumb terminals or text-only screens.static IdentityclientGame()A client running on a gaming console.static IdentityclientHandheld()A client running on a PDA, RIM device, or other handheld.static IdentityclientPc()Standard full-GUI client used on desktops and laptops.static IdentityclientPhone()A client running on a mobile phone or other telephony device.static IdentityclientSms()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.static IdentityclientWeb()A client operated from within a web browser.static IdentitycollaborationWhiteboard()Multi-user whiteboarding service.intcompareTo(Identity o)Implements a natural ordering of an identity, as suggested and required by XEP-0115: Entity Capabilities.static IdentitycomponentArchive()A server component that archives traffic.static IdentitycomponentClientToServer()A server component that handles client connections.static IdentitycomponentGeneric()A server component other than one of the registered types.static IdentitycomponentLoadBalancing()A server component that handles load balancing.static IdentitycomponentLog()A server component that logs server information.static IdentitycomponentPresence()A server component that provides presence information.static IdentitycomponentRouter()A server component that handles core routing logic.static IdentitycomponentServerToServer()A server component that handles server connections.static IdentitycomponentSessionManagement()A server component that manages user sessions.static IdentitycomponentStatistics()A server component that provides server statistics.static IdentityconferenceIrc()Internet Relay Chat service.static IdentityconferenceText()Text conferencing service.static IdentitydirectoryChatRoom()A directory of chatrooms.static IdentitydirectoryGroup()A directory that provides shared roster groups.static IdentitydirectoryUser()A directory of end users (e.g., JUD).static IdentitydirectoryWaitingList()A directory of waiting list entries.booleanequals(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.static IdentitygatewayAIM()Gateway to AOL Instant Messenger.static IdentitygatewayFacebook()Gateway to the Facebook IM service.static IdentitygatewayGaduGadu()Gateway to the Gadu-Gadu IM service.static IdentitygatewayHttpWs()Gateway that provides HTTP Web Services access.static IdentitygatewayICQ()Gateway to ICQ.static IdentitygatewayIRC()Gateway to IRC.static IdentitygatewayLCS()Gateway to Microsoft Live Communications Server.static IdentitygatewayMSN()Gateway to MSN Messenger.static IdentitygatewayMySpaceIM()Gateway to the MySpace IM service.static IdentitygatewayOCS()Gateway to Microsoft Office Communications Server.static IdentitygatewayQQ()Gateway to the QQ IM service.static IdentitygatewaySametime()Gateway to IBM Lotus Sametime.static IdentitygatewaySimple()Gateway to SIP for Instant Messaging and Presence Leveraging Extensions (SIMPLE).static IdentitygatewaySkype()Gateway to the Skype service.static IdentitygatewaySMS()Gateway to Short Message Service.static IdentitygatewaySMTP()Gateway to the SMTP (email) network.static IdentitygatewayTlen()Gateway to the Tlen IM service.static IdentitygatewayXfire()Gateway to the Xfire gaming and IM service.static IdentitygatewayXMPP()Gateway to another XMPP service (NOT via native server-to-server communication).static IdentitygatewayYahoo()Gateway to Yahoo!StringgetCategory()Gets the category, e.g. server, client, gateway, directory, etc.LocalegetLanguage()The optional language to localize the name.StringgetName()Gets the identity's name.StringgetType()Gets the type within the category, e.g.inthashCode()static IdentityheadlineNewMail()Service that notifies a user of new email messages.static IdentityheadlineRss()RSS notification service.static IdentityheadlineWeather()Service that provides weather alerts..static IdentityhierarchyBranch()A service discovery node that contains further nodes in the hierarchy.static IdentityhierarchyLeaf()A service discovery node that does not contain further nodes in the hierarchy.static IdentityofCategoryAndType(String category, String type)Creates an identity with a category and type.static IdentityproxyByteStreams()SOCKS5 bytestreams proxy service.static IdentitypubsubCollection()A pubsub node of the "collection" type.static IdentitypubsubLeaf()A pubsub node of the "leaf" type.static IdentitypubsubPersonalEventingService()A personal eventing service that supports the publish-subscribe subset defined in XEP-0163..static IdentitypubsubService()A pubsub service that supports the functionality defined in XEP-0060.static IdentityserverInstantMessaging()Standard Jabber/XMPP server used for instant messaging and presence.static IdentitystoreBerkeley()A server component that stores data in a Berkeley database.static IdentitystoreFile()A server component that stores data on the file system.static IdentitystoreGeneric()A server data storage component other than one of the registered types.static IdentitystoreLdap()A server component that stores data in an LDAP database.static IdentitystoreMySQL()A server component that stores data in a MySQL database.static IdentitystoreOracle()A server component that stores data in an Oracle database.static IdentitystorePostgreSQL()A server component that stores data in a PostgreSQL database.StringtoString()IdentitywithName(String name)Creates a new identity with a name.IdentitywithName(String name, Locale language)Creates a new identity with a name and a language.
-
-
-
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
-
getLanguage
public final Locale getLanguage()
The optional language to localize the name.- Specified by:
getLanguagein interfaceLanguageElement- Returns:
- The language.
-
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.
-
compareTo
public final int compareTo(Identity o)
Implements a natural ordering of an identity, as suggested and required by XEP-0115: Entity Capabilities.- Specified by:
compareToin interfaceComparable<Identity>- Parameters:
o- The other identity.- Returns:
- The result of the comparison.
-
withName
public Identity withName(String name)
Creates a new identity with a name.- Parameters:
name- The name.- Returns:
- The identity.
-
-