Interface ApiWrapper

  • All Known Implementing Classes:
    StreamIDHelp, TokenManager

    public interface ApiWrapper
    This interface allows you to specify a proxy-based wrapper around an implementation class. This is implemented by TokenManager, but could also be used for other wrappers, such as metrics recording or leader election/failover.
    Author:
    Rob Moffat
    • Method Detail

      • wrap

        <X> X wrap​(Class<X> c,
                   X api)
        Returns a wrapped implementation of the interface.
        Parameters:
        c - interface class.
        api - instance of the interface
        Returns:
        wrapped instance.