aboutsummaryrefslogtreecommitdiffstats
path: root/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/JaxRsStrategy.java
blob: cd7d8684cbca5eb98da7f971ab8f92475ff42c63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.jaxrs.client;

import java.io.IOException;
import java.util.function.Function;

/**
 * This interface allows different strategies for accessing server-side JAX-RS APIs programmatically.
 *
 * @author bakksjo
 */
public interface JaxRsStrategy<T> {
    <R> R apply(final Function<T, R> function) throws IOException;

    default <R> R apply(final Function<T, R> function, JaxRsTimeouts timeouts) throws IOException {
        return apply(function);
    }
}