Search in sources :

Example 1 with IndyClientModule

use of org.commonjava.indy.client.core.IndyClientModule in project indy by Commonjava.

the class DownloadContentHasLengthHeaderHostedTest method getAdditionalClientModules.

@Override
protected Collection<IndyClientModule> getAdditionalClientModules() {
    List<IndyClientModule> mods = new ArrayList<>();
    Collection<IndyClientModule> fromParent = super.getAdditionalClientModules();
    if (fromParent != null) {
        mods.addAll(fromParent);
    }
    mods.add(new IndyRawHttpModule());
    return mods;
}
Also used : ArrayList(java.util.ArrayList) IndyRawHttpModule(org.commonjava.indy.client.core.module.IndyRawHttpModule) IndyClientModule(org.commonjava.indy.client.core.IndyClientModule)

Example 2 with IndyClientModule

use of org.commonjava.indy.client.core.IndyClientModule in project indy by Commonjava.

the class DownloadContentHasLengthHeaderTest method getAdditionalClientModules.

@Override
protected Collection<IndyClientModule> getAdditionalClientModules() {
    List<IndyClientModule> mods = new ArrayList<>();
    Collection<IndyClientModule> fromParent = super.getAdditionalClientModules();
    if (fromParent != null) {
        mods.addAll(fromParent);
    }
    mods.add(new IndyRawHttpModule());
    return mods;
}
Also used : ArrayList(java.util.ArrayList) IndyRawHttpModule(org.commonjava.indy.client.core.module.IndyRawHttpModule) IndyClientModule(org.commonjava.indy.client.core.IndyClientModule)

Example 3 with IndyClientModule

use of org.commonjava.indy.client.core.IndyClientModule in project indy by Commonjava.

the class DownloadDiagBundleTest method createIndyClient.

protected Indy createIndyClient() throws IndyClientException {
    SiteConfig config = new SiteConfigBuilder("indy", fixture.getUrl()).withRequestTimeoutSeconds(120).build();
    Collection<IndyClientModule> modules = getAdditionalClientModules();
    return new Indy(config, new MemoryPasswordManager(), new IndyObjectMapper(getAdditionalMapperModules()), modules.toArray(new IndyClientModule[modules.size()]));
}
Also used : IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) SiteConfigBuilder(org.commonjava.util.jhttpc.model.SiteConfigBuilder) Indy(org.commonjava.indy.client.core.Indy) SiteConfig(org.commonjava.util.jhttpc.model.SiteConfig) MemoryPasswordManager(org.commonjava.util.jhttpc.auth.MemoryPasswordManager) IndyClientModule(org.commonjava.indy.client.core.IndyClientModule)

Example 4 with IndyClientModule

use of org.commonjava.indy.client.core.IndyClientModule in project indy by Commonjava.

the class AbstractIndyFunctionalTest method createIndyClient.

protected Indy createIndyClient() throws IndyClientException {
    SiteConfig config = new SiteConfigBuilder("indy", fixture.getUrl()).withRequestTimeoutSeconds(60).build();
    Collection<IndyClientModule> modules = getAdditionalClientModules();
    return new Indy(config, new MemoryPasswordManager(), new IndyObjectMapper(getAdditionalMapperModules()), modules.toArray(new IndyClientModule[modules.size()]));
}
Also used : IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) SiteConfigBuilder(org.commonjava.util.jhttpc.model.SiteConfigBuilder) Indy(org.commonjava.indy.client.core.Indy) SiteConfig(org.commonjava.util.jhttpc.model.SiteConfig) MemoryPasswordManager(org.commonjava.util.jhttpc.auth.MemoryPasswordManager) IndyClientModule(org.commonjava.indy.client.core.IndyClientModule)

Aggregations

IndyClientModule (org.commonjava.indy.client.core.IndyClientModule)4 ArrayList (java.util.ArrayList)2 Indy (org.commonjava.indy.client.core.Indy)2 IndyRawHttpModule (org.commonjava.indy.client.core.module.IndyRawHttpModule)2 IndyObjectMapper (org.commonjava.indy.model.core.io.IndyObjectMapper)2 MemoryPasswordManager (org.commonjava.util.jhttpc.auth.MemoryPasswordManager)2 SiteConfig (org.commonjava.util.jhttpc.model.SiteConfig)2 SiteConfigBuilder (org.commonjava.util.jhttpc.model.SiteConfigBuilder)2