org.apache.maven.index.updater
Interface ResourceFetcher

All Known Implementing Classes:
DefaultIndexUpdater.FileFetcher, WagonHelper.WagonFetcher

public interface ResourceFetcher

An interface defining resource downloading contract

Author:
Eugene Kuleshov

Method Summary
 void connect(String id, String url)
          Connect and start transfer session
 void disconnect()
          Disconnect and complete transfer session
 InputStream retrieve(String name)
          Retrieves resource as InputStream
 

Method Detail

connect

void connect(String id,
             String url)
             throws IOException
Connect and start transfer session

Throws:
IOException

disconnect

void disconnect()
                throws IOException
Disconnect and complete transfer session

Throws:
IOException

retrieve

InputStream retrieve(String name)
                     throws IOException,
                            FileNotFoundException
Retrieves resource as InputStream

Parameters:
name - a name of resource to retrieve
Throws:
IOException
FileNotFoundException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.