Implementing client
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-client@111741 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
54feb61037
commit
f944f545f7
|
@ -0,0 +1,26 @@
|
|||
package org.gcube.vremanagement.executor.client;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.gcube.common.calls.jaxws.GcubeService;
|
||||
import org.gcube.vremanagement.executor.api.Executor;
|
||||
|
||||
public class Constants {
|
||||
|
||||
/* Must be the same of generated WEB-INF/gcube-app.xml */
|
||||
public static final String SERVICE_CLASS = "VREManagement";
|
||||
public static final String SERVICE_NAME = "smart-executor";
|
||||
|
||||
public static final String NAMESPACE = "http://gcube-system.org/namespaces/vremanagement/smart-executor";
|
||||
|
||||
public static final String SERVICE_NAMESPACE = "http://gcube-system.org/namespaces/data/speciesproductsdiscovery/service";
|
||||
|
||||
public static final int DEFAULT_TIMEOUT= (int) TimeUnit.SECONDS.toMillis(10);
|
||||
|
||||
public static final QName EXECUTOR_QNAME = new QName(Executor.TNS, Executor.SERVICE_NAME);
|
||||
public static final GcubeService<Executor> executor = GcubeService.service().withName(EXECUTOR_QNAME).andInterface(Executor.class);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package org.gcube.vremanagement.executor.client.plugins;
|
||||
|
||||
import org.gcube.common.clients.Plugin;
|
||||
import org.gcube.vremanagement.executor.client.Constants;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||
*
|
||||
* @param <S>
|
||||
* @param <P>
|
||||
*/
|
||||
public abstract class AbstractPlugin<S,P> implements Plugin<S,P> {
|
||||
|
||||
public final String name;
|
||||
|
||||
public AbstractPlugin(String name) {
|
||||
this.name=name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serviceClass() {
|
||||
return Constants.SERVICE_CLASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serviceName() {
|
||||
return Constants.SERVICE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String namespace() {
|
||||
return Constants.NAMESPACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue