Package org.gcube.common.scope.impl
Class ScopedServiceMap
- java.lang.Object
-
- org.gcube.common.scope.impl.ScopedServiceMap
-
- All Implemented Interfaces:
ServiceMap
public class ScopedServiceMap extends Object implements ServiceMap
AServiceMapthat forwards requests toServiceMaps associated with the current scope.At construction time, it configures itself with all the service maps found in the classpath (excluding URLs available to primordial and extension classloader). Recognises service maps as resources whose names match a
ServiceMapScanner.mapConfigPattern.- Author:
- Fabio Simeoni
-
-
Field Summary
-
Fields inherited from interface org.gcube.common.scope.api.ServiceMap
instance
-
-
Constructor Summary
Constructors Constructor Description ScopedServiceMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceMapcurrentMap()Stringendpoint(String service)Returns the endpoint of a given service.Stringscope()Returns the associated scope.Stringversion()Returns the release version of the map.
-
-
-
Method Detail
-
scope
public String scope()
Description copied from interface:ServiceMapReturns the associated scope.- Specified by:
scopein interfaceServiceMap- Returns:
- the scope
-
version
public String version()
Description copied from interface:ServiceMapReturns the release version of the map.- Specified by:
versionin interfaceServiceMap- Returns:
- the version
-
endpoint
public String endpoint(String service) throws IllegalArgumentException, IllegalStateException
Description copied from interface:ServiceMapReturns the endpoint of a given service.- Specified by:
endpointin interfaceServiceMap- Parameters:
service- the service- Returns:
- the endpoint
- Throws:
IllegalArgumentException- if the service has no endpoint in the mapIllegalStateException- if the service endpoint cannot be returned
-
currentMap
public ServiceMap currentMap()
-
-