All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dbstarll.utils.net.api.BasicIndexResponseHandlerFactory Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
package io.github.dbstarll.utils.net.api;

import io.github.dbstarll.utils.http.client.response.AbstractResponseHandlerFactory;
import io.github.dbstarll.utils.net.api.index.EventStreamIndex;
import io.github.dbstarll.utils.net.api.index.EventStreamIndexResponseHandler;
import io.github.dbstarll.utils.net.api.index.StringIndex;
import io.github.dbstarll.utils.net.api.index.StringIndexResponseHandler;
import org.apache.hc.core5.http.io.HttpClientResponseHandler;

public class BasicIndexResponseHandlerFactory extends AbstractResponseHandlerFactory {
    /**
     * 构造BasicIndexResponseHandlerFactory.
     *
     * @param stringResponseHandler ResponseHandler for String
     */
    public BasicIndexResponseHandlerFactory(final HttpClientResponseHandler stringResponseHandler) {
        addResponseHandler(StringIndex.class, new StringIndexResponseHandler(stringResponseHandler));
        addResponseHandler(EventStreamIndex.class, new EventStreamIndexResponseHandler(stringResponseHandler));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy