Client getter methods
This commit is contained in:
parent
5685698a02
commit
6c0d6c1ec9
|
@ -2,7 +2,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for org.gcube.data.transfer.data-transfer-library
|
||||
|
||||
##[v1.2.3] 2020-12-01
|
||||
##[v1.2.3-SNAPSHOT] 2020-12-01
|
||||
|
||||
* Deletion method
|
||||
* GetInfo method
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
</parent>
|
||||
<groupId>org.gcube.data.transfer</groupId>
|
||||
<artifactId>data-transfer-library</artifactId>
|
||||
<version>1.2.3</version>
|
||||
<version>1.2.3-SNAPSHOT</version>
|
||||
<name>DataTransfer-library</name>
|
||||
<description>Data Transfer Service client library</description>
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.net.URL;
|
|||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.data.transfer.library.client.Client;
|
||||
import org.gcube.data.transfer.library.faults.DestinationNotSetException;
|
||||
import org.gcube.data.transfer.library.faults.FailedTransferException;
|
||||
import org.gcube.data.transfer.library.faults.HostingNodeNotFoundException;
|
||||
|
@ -32,6 +33,9 @@ public class DataTransferClient {
|
|||
private DataTransferClient(Transferer transferer) {
|
||||
this.transferer=transferer;
|
||||
}
|
||||
public Client getWebClient() {
|
||||
return transferer.getClient();
|
||||
}
|
||||
|
||||
public static DataTransferClient getInstanceByEndpoint(String endpoint) throws UnreachableNodeException, ServiceNotFoundException{
|
||||
log.debug("Getting transferer for endpoint : "+endpoint);
|
||||
|
|
|
@ -25,18 +25,20 @@ import org.gcube.data.transfer.model.TransferRequest;
|
|||
import org.gcube.data.transfer.model.TransferTicket;
|
||||
import org.gcube.data.transfer.model.TransferTicket.Status;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public abstract class Transferer {
|
||||
|
||||
|
||||
@Getter
|
||||
protected Client client;
|
||||
|
||||
protected Transferer(Client client){
|
||||
this.client=client;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected Source source=null;
|
||||
|
|
Loading…
Reference in New Issue