Interface ConnFactory

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    OpenTsdbConnectionFactory, TestableConnFactory
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ConnFactory
    extends java.io.Serializable
    A factory for connections based on input elements.
    • Method Detail

      • openConnection

        @Nullable
        java.net.HttpURLConnection openConnection​(java.net.URI base,
                                                  StreamElement elem)
                                           throws java.io.IOException
        Open and return HTTP(S) connection to given base URI with given input stream element. The returned connection must be open and ready to retrieve status.
        Parameters:
        base - URI
        elem - input element
        Returns:
        new connection
        Throws:
        java.io.IOException - on IO errors