Package rocks.xmpp.extensions.geoloc
Class GeoLocationManager
- java.lang.Object
-
- rocks.xmpp.core.session.Manager
-
- rocks.xmpp.extensions.geoloc.GeoLocationManager
-
public final class GeoLocationManager extends Manager
Manages the publishing of user location and the notification of it.- See Also:
- XEP-0080: User Location
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGeoLocationListener(Consumer<GeoLocationEvent> geoLocationListener)
Adds a listener, which allows to listen for geo location changes.AsyncResult<String>
publish(GeoLocation geoLocation)
Publishes a geo location to the personal eventing service.void
removeGeoLocationListener(Consumer<GeoLocationEvent> geoLocationListener)
Removes a previously added geo location listener.-
Methods inherited from class rocks.xmpp.core.session.Manager
isEnabled, setEnabled
-
-
-
-
Method Detail
-
publish
public AsyncResult<String> publish(GeoLocation geoLocation)
Publishes a geo location to the personal eventing service.- Parameters:
geoLocation
- The geo location.- Returns:
- The async result with the item id, generated by the pubsub service.
-
addGeoLocationListener
public void addGeoLocationListener(Consumer<GeoLocationEvent> geoLocationListener)
Adds a listener, which allows to listen for geo location changes.- Parameters:
geoLocationListener
- The listener.- See Also:
removeGeoLocationListener(Consumer)
-
removeGeoLocationListener
public void removeGeoLocationListener(Consumer<GeoLocationEvent> geoLocationListener)
Removes a previously added geo location listener.- Parameters:
geoLocationListener
- The listener.- See Also:
addGeoLocationListener(Consumer)
-
-