Package org.jivesoftware.smack.packet
Interface StanzaView
- All Superinterfaces:
XmlLangElement
- All Known Subinterfaces:
AdHocCommandDataView
,DiscoverInfoView
,IqView
,MessageView
,PresenceView
,TimeView
,VersionView
- All Known Implementing Classes:
AbstractHttpOverXmpp
,AbstractIqBuilder
,AdHocCommandData
,AdHocCommandDataBuilder
,AgentChatHistory
,AgentInfo
,AgentStatusRequest
,AgentWorkgroups
,Bind
,BlockContactsIQ
,BlockListIQ
,BoBIQ
,Bytestream
,Carbon.Disable
,Carbon.Enable
,ChatMetadata
,ChatNotes
,ChatSettings
,ClearCache
,ClearCacheResponse
,Close
,Data
,DepartQueuePacket
,DisablePushNotificationsIQ
,DiscoverInfo
,DiscoverInfoBuilder
,DiscoverItems
,DnsIq
,EmptyResultIQ
,EnablePushNotificationsIQ
,ErrorIQ
,ErrorIQ.Builder
,GenericSettings
,HttpOverXmppReq
,HttpOverXmppResp
,IoTClaimed
,IoTDataReadOutAccepted
,IoTDataRequest
,IoTDisown
,IoTDisowned
,IoTIsFriend
,IoTIsFriendResponse
,IoTMine
,IoTRegister
,IoTRemove
,IoTRemoved
,IoTSetRequest
,IoTSetResponse
,IoTUnregister
,IQ
,IqBuilder
,IqData
,JidPrepIq
,Jingle
,Jingle
,Jingle.Builder
,LastActivity
,Macros
,MamFinIQ
,MamPrefsIQ
,MamQueryIQ
,Message
,MessageBuilder
,MessageOrPresence
,MessageOrPresenceBuilder
,MonitorPacket
,MUCAdmin
,MUCLightAffiliationsIQ
,MUCLightBlockingIQ
,MUCLightChangeAffiliationsIQ
,MUCLightConfigurationIQ
,MUCLightCreateIQ
,MUCLightDestroyIQ
,MUCLightGetAffiliationsIQ
,MUCLightGetConfigsIQ
,MUCLightGetInfoIQ
,MUCLightInfoIQ
,MUCLightSetConfigsIQ
,MUCOwner
,OccupantsInfo
,OfferConfirmation
,OfferRequestProvider.OfferRequestPacket
,OfferRevokeProvider.OfferRevokePacket
,OfflineMessageRequest
,OfflineSettings
,Open
,Ping
,Presence
,PresenceBuilder
,Privacy
,PrivateDataIQ
,PubSub
,Registration
,RoomInvitation.RoomInvitationIQ
,RoomTransfer.RoomTransferIQ
,RosterPacket
,RTPBridge
,SearchSettings
,Session
,SharedGroupsInfo
,SimpleIQ
,Slot
,Slot_V0_2
,SlotRequest
,SlotRequest_V0_2
,SoundSettings
,Stanza
,StanzaBuilder
,StreamInitiation
,STUN
,Time
,TimeBuilder
,Transcript
,Transcripts
,TranscriptSearch
,UnblockContactsIQ
,UnparsedIQ
,UserSearch
,VCard
,Version
,VersionBuilder
,WorkgroupForm
,WorkgroupProperties
-
Method Summary
Modifier and TypeMethodDescriptiongetError()
Returns the error associated with this packet, ornull
if there are no errors.default <E extends ExtensionElement>
EgetExtension
(Class<E> extensionElementClass) getExtension
(QName qname) Returns a list of all extension elements of this stanza.<E extends ExtensionElement>
List<E>getExtensions
(Class<E> extensionElementClass) Return all extension elements of the given type.getExtensions
(QName qname) getFrom()
Returns who the stanza is being sent "from" ornull
if the value is not set.Returns the unique ID of the stanza.getTo()
Returns who the stanza is being sent "to", ornull
if the value is not set.default boolean
hasExtension
(Class<? extends ExtensionElement> extensionElementClass) default boolean
hasExtension
(String namespace) Check if a extension element with the given namespace exists.default boolean
hasExtension
(QName qname) Methods inherited from interface org.jivesoftware.smack.packet.XmlLangElement
getLanguage
-
Method Details
-
getStanzaId
Returns the unique ID of the stanza. The returned value could benull
.- Returns:
- the packet's unique ID or
null
if the id is not available.
-
getTo
Returns who the stanza is being sent "to", ornull
if the value is not set. The XMPP protocol often makes the "to" attribute optional, so it does not always need to be set.- Returns:
- who the stanza is being sent to, or
null
if the value has not been set.
-
getFrom
Returns who the stanza is being sent "from" ornull
if the value is not set. The XMPP protocol often makes the "from" attribute optional, so it does not always need to be set.- Returns:
- who the stanza is being sent from, or
null
if the value has not been set.
-
getError
Returns the error associated with this packet, ornull
if there are no errors.- Returns:
- the error sub-packet or
null
if there isn't an error.
-
getExtension
-
hasExtension
-
hasExtension
-
hasExtension
Check if a extension element with the given namespace exists.- Parameters:
namespace
- the namespace of the extension element to check for.- Returns:
- true if a stanza extension exists, false otherwise.
-
getExtension
-
getExtensions
Returns a list of all extension elements of this stanza.- Returns:
- a list of all extension elements of this stanza.
-
getExtensions
-
getExtensions
Return all extension elements of the given type. Returns the empty list if there a none.- Type Parameters:
E
- the type of extension elements.- Parameters:
extensionElementClass
- the class of the type of extension elements.- Returns:
- a list of extension elements of that type, which may be empty.
-