All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.unicore.uas.CoreClientCapabilities Maven / Gradle / Ivy

The newest version!
package eu.unicore.uas;

import eu.unicore.client.data.FiletransferClient;
import eu.unicore.services.ClientCapabilities;
import eu.unicore.services.ClientCapability;

/**
 * advertises client capabilities of the uas-client module
 *
 * @author schuller
 */
public class CoreClientCapabilities implements ClientCapabilities {

	@Override
	public ClientCapability[] getClientCapabilities() {
		return new ClientCapability[]{
				REST_BFT_Client,
				REST_UFTP_Client,
		};
	}	

	/**
	 * REST file transfer capability
	 */
	public static interface RESTFTClientCapability extends ClientCapability{
		
		public String getProtocol();
		
		public ClassgetImplementation();
	}
	
	private static RESTFTClientCapability REST_BFT_Client = new RESTFTClientCapability(){
		public String getProtocol() {
			return "BFT";
		}
		public Class getImplementation() {
			return eu.unicore.client.data.HttpFileTransferClient.class;
		}
		public Class getInterface() {
			return FiletransferClient.class;
		}
	};
	
	private static RESTFTClientCapability REST_UFTP_Client = new RESTFTClientCapability(){
		public String getProtocol() {
			return "UFTP";
		}
		public Class getImplementation() {
			return eu.unicore.client.data.UFTPFileTransferClient.class;
		}
		public Class getInterface() {
			return FiletransferClient.class;
		}
	};
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy