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
public interface StanzaView extends XmlLangElement
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StanzaErrorgetError()Returns the error associated with this packet, ornullif there are no errors.default <E extends ExtensionElement>
EgetExtension(Class<E> extensionElementClass)XmlElementgetExtension(QName qname)List<XmlElement>getExtensions()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.List<XmlElement>getExtensions(QName qname)JidgetFrom()Returns who the stanza is being sent "from" ornullif the value is not set.StringgetStanzaId()Returns the unique ID of the stanza.JidgetTo()Returns who the stanza is being sent "to", ornullif the value is not set.default booleanhasExtension(Class<? extends ExtensionElement> extensionElementClass)default booleanhasExtension(String namespace)Check if a extension element with the given namespace exists.default booleanhasExtension(QName qname)-
Methods inherited from interface org.jivesoftware.smack.packet.XmlLangElement
getLanguage
-
-
-
-
Method Detail
-
getStanzaId
String getStanzaId()
Returns the unique ID of the stanza. The returned value could benull.- Returns:
- the packet's unique ID or
nullif the id is not available.
-
getTo
Jid getTo()
Returns who the stanza is being sent "to", ornullif 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
nullif the value has not been set.
-
getFrom
Jid getFrom()
Returns who the stanza is being sent "from" ornullif 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
nullif the value has not been set.
-
getError
StanzaError getError()
Returns the error associated with this packet, ornullif there are no errors.- Returns:
- the error sub-packet or
nullif there isn't an error.
-
getExtension
XmlElement getExtension(QName qname)
-
hasExtension
default boolean hasExtension(QName qname)
-
hasExtension
default boolean hasExtension(Class<? extends ExtensionElement> extensionElementClass)
-
hasExtension
default boolean hasExtension(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(Class<E> extensionElementClass)
-
getExtensions
List<XmlElement> getExtensions()
Returns a list of all extension elements of this stanza.- Returns:
- a list of all extension elements of this stanza.
-
getExtensions
List<XmlElement> getExtensions(QName qname)
-
getExtensions
<E extends ExtensionElement> List<E> getExtensions(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.
-
-