Package org.jivesoftware.smack.packet
Interface StanzaView
-
- All Superinterfaces:
XmlLangElement
- All Known Subinterfaces:
DiscoverInfoView
,IqView
,MessageView
,PresenceView
- All Known Implementing Classes:
AbstractHttpOverXmpp
,AbstractIqBuilder
,AdHocCommandData
,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
,Transcript
,Transcripts
,TranscriptSearch
,UnblockContactsIQ
,UnparsedIQ
,UserSearch
,VCard
,Version
,WorkgroupForm
,WorkgroupProperties
public interface StanzaView extends XmlLangElement
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StanzaError
getError()
Returns the error associated with this packet, ornull
if there are no errors.default <E extends ExtensionElement>
EgetExtension(java.lang.Class<E> extensionElementClass)
ExtensionElement
getExtension(javax.xml.namespace.QName qname)
java.util.List<ExtensionElement>
getExtensions()
Returns a list of all extension elements of this stanza.<E extends ExtensionElement>
java.util.List<E>getExtensions(java.lang.Class<E> extensionElementClass)
Return all extension elements of the given type.java.util.List<ExtensionElement>
getExtensions(javax.xml.namespace.QName qname)
Jid
getFrom()
Returns who the stanza is being sent "from" ornull
if the value is not set.java.lang.String
getStanzaId()
Returns the unique ID of the stanza.Jid
getTo()
Returns who the stanza is being sent "to", ornull
if the value is not set.default boolean
hasExtension(java.lang.Class<? extends ExtensionElement> extensionElementClass)
default boolean
hasExtension(java.lang.String namespace)
Check if a extension element with the given namespace exists.default boolean
hasExtension(javax.xml.namespace.QName qname)
-
Methods inherited from interface org.jivesoftware.smack.packet.XmlLangElement
getLanguage
-
-
-
-
Method Detail
-
getStanzaId
java.lang.String 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
Jid 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
Jid 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
StanzaError 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
ExtensionElement getExtension(javax.xml.namespace.QName qname)
-
hasExtension
default boolean hasExtension(javax.xml.namespace.QName qname)
-
hasExtension
default boolean hasExtension(java.lang.Class<? extends ExtensionElement> extensionElementClass)
-
hasExtension
default boolean hasExtension(java.lang.String namespace)
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
default <E extends ExtensionElement> E getExtension(java.lang.Class<E> extensionElementClass)
-
getExtensions
java.util.List<ExtensionElement> getExtensions()
Returns a list of all extension elements of this stanza.- Returns:
- a list of all extension elements of this stanza.
-
getExtensions
java.util.List<ExtensionElement> getExtensions(javax.xml.namespace.QName qname)
-
getExtensions
<E extends ExtensionElement> java.util.List<E> getExtensions(java.lang.Class<E> extensionElementClass)
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.
-
-