Added basic outline
This commit is contained in:
23
src/main/java/de/rwu/easydrop/api/client/DataSource.java
Normal file
23
src/main/java/de/rwu/easydrop/api/client/DataSource.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package de.rwu.easydrop.api.client;
|
||||
|
||||
import de.rwu.easydrop.api.dto.ProductDTO;
|
||||
|
||||
/**
|
||||
* Universal interface to implement concrete APIs on.
|
||||
*/
|
||||
public interface DataSource {
|
||||
/**
|
||||
* Retrieves product info from the data source.
|
||||
*
|
||||
* @param productId Identifier
|
||||
* @return ProductDTO
|
||||
*/
|
||||
ProductDTO getProductById(String productId);
|
||||
|
||||
/**
|
||||
* Breaks the connection after specified time.
|
||||
*
|
||||
* @param timeoutSeconds Seconds to time out after
|
||||
*/
|
||||
void setConnectionTimeout(int timeoutSeconds);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* API client connectors for interaction with external data sources.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
package de.rwu.easydrop.api.client;
|
||||
Reference in New Issue
Block a user