package com.syncservice.server.location;

import java.util.List;

import com.syncservice.server.location.exception.LocationConnectException;
import com.syncservice.server.location.exception.LocationReaderException;

/**
 * An interface used to read a files from a client location as an input streams.
 * 
 * @author Andrzej Poloczek
 * @version 1.0
 */
public interface LocationReader {

	/**
	 * <b>Connect to a client location to read files</b>.
	 * <p></p>
	 * 
	 * @param location A location object
	 * @throws LocationConnectException
	 */
	public void connect(Location location) throws LocationConnectException;
	
	/**
	 * <b>List a files to read from a client location</b>
	 * 
	 * @return
	 * @throws LocationReaderException
	 */
	public List<ReaderItem> list() throws LocationReaderException;
	
	/**
	 * <b>Close a connection</b>.
	 * 
	 * @throws LocationReaderException
	 */
	public void disconnect() throws LocationReaderException;
}
