Interface GeolocationClient

All Superinterfaces:
Serializable

@NullMarked public interface GeolocationClient extends Serializable
Port between the Geolocation facade and whatever delivers actual position data — the browser in production, an in-memory test driver in unit tests.

Framework internal. Application code does not implement this interface directly. Replacement clients are installed at facade construction time by registering a GeolocationClientFactory through Vaadin's Lookup; Geolocation then hands the resulting client every get(com.vaadin.flow.component.geolocation.GeolocationOptions), startWatch(com.vaadin.flow.component.Component, com.vaadin.flow.component.geolocation.GeolocationOptions, com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.geolocation.GeolocationResult>) and subscribeAvailability(com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.geolocation.GeolocationAvailability>) call. When no factory is registered, Geolocation uses the built-in browser-backed client.

Threading: all callbacks on this interface (the future returned by get(com.vaadin.flow.component.geolocation.GeolocationOptions), the onUpdate consumer passed to startWatch(com.vaadin.flow.component.Component, com.vaadin.flow.component.geolocation.GeolocationOptions, com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.geolocation.GeolocationResult>), and the onChange consumer passed to subscribeAvailability(com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.geolocation.GeolocationAvailability>)) must be invoked on the UI thread.