Skip to main content

IPProvider

public class IPProvider

↳ package com.onekosmos.blockid.sdk.BIDAPIs.publicip;


The IPProvider class provides a mechanism for fetching and caching the user's IP address from a remote API. This class ensures that the IP address is regularly updated in the background, and it provides a simple interface for retrieving the current IP address from the cache.

By default, the IP address cache time interval is 10 minutes, after which the IP address is automatically refreshed from the API.

Method Summary​

TypeMethodDescription
StringgetIPAddress()Returns the current IP address from the cache.
IPProvidergetInstance()Returns an instance of IPProvider.