Interface ServiceContext<S>
-
- Type Parameters:
S- the generic type of theservice API.
- All Known Subinterfaces:
ServiceDiscoveryContext<S>,ServiceHeaderContext<S>
- All Known Implementing Classes:
AbstractServiceContext,ServiceContextImpl
public interface ServiceContext<S>This interface gives read access to contextual information of aService.- Since:
- 3.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<S>getApi()ConfigPropertiesgetConfig()StringgetHeader(String name)Collection<String>getHeaderNames()StringgetUrl()
-
-
-
Method Detail
-
getUrl
String getUrl()
- Returns:
- the URL (or URI) of the remote service.
-
getHeaderNames
Collection<String> getHeaderNames()
- Returns:
- a
Collectionwith the availableheadernames (keys).
-
getHeader
String getHeader(String name)
- Parameters:
name- the name (key) of the header to get.- Returns:
- the value of the requested header or
nullif undefined.
-
getConfig
ConfigProperties getConfig()
- Returns:
- the
ConfigPropertieswith configuration metadata. - See Also:
ServiceClientFactory.create(Class, java.util.Map)
-
-