public final class GeoLocationManager
extends org.jivesoftware.smack.Manager
Constructor and Description |
---|
GeoLocationManager(org.jivesoftware.smack.XMPPConnection connection) |
Modifier and Type | Method and Description |
---|---|
static GeoLocationManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
Retrieves a
GeoLocationManager for the specified XMPPConnection , creating one if it doesn't
already exist. |
static boolean |
isGeoLocationMessage(org.jivesoftware.smack.packet.Message message)
Returns true if the message contains a GeoLocation extension.
|
void |
sendGeolocation(GeoLocation geoLocation)
Send geolocation through the PubSub node.
|
void |
sendGeoLocationToJid(GeoLocation geoLocation,
org.jxmpp.jid.Jid jid) |
void |
stopPublishingGeolocation()
Send empty geolocation through the PubSub node.
|
public GeoLocationManager(org.jivesoftware.smack.XMPPConnection connection)
public static GeoLocationManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
GeoLocationManager
for the specified XMPPConnection
, creating one if it doesn't
already exist.connection
- The connection the manager is attached to.public void sendGeoLocationToJid(GeoLocation geoLocation, org.jxmpp.jid.Jid jid) throws java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotConnectedException
public static boolean isGeoLocationMessage(org.jivesoftware.smack.packet.Message message)
message
- the message to check if contains a GeoLocation extension or notpublic void sendGeolocation(GeoLocation geoLocation) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, PubSubException.NotALeafNodeException
geoLocation
- java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NoResponseException
PubSubException.NotALeafNodeException
public void stopPublishingGeolocation() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, PubSubException.NotALeafNodeException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NoResponseException
PubSubException.NotALeafNodeException