package com.atlassian.bitbucket.mirroring.mirror.client;

import com.atlassian.bitbucket.mirroring.mirror.UpstreamServer;

import javax.annotation.Nonnull;

/**
 * Creates {@link UpstreamClient clients} for interacting with {@link UpstreamServer upstream servers}
 *
 * @since 4.5
 */
public interface UpstreamClientFactory {

    /**
     * Creates a new client for an upstream
     *
     * @param upstream the upstream to create the client for
     * @return a new client to interact with the upstream
     */
    @Nonnull
    UpstreamClient create(@Nonnull UpstreamServer upstream);
}
