-
public interface ContextA context defines additional information and resources for the environment in which the components are running.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <R> Optional<R>getResource(Class<R> resourceClass)Get a single resource which matches.Stream<Resource>getResources()Get all the resourcesdefault <R> Stream<R>getResources(Class<R> resourceClass)Get all the resources of that class.
-
-
-
Method Detail
-
getResources
default <R> Stream<R> getResources(Class<R> resourceClass)
Get all the resources of that class.- Type Parameters:
R- the resource class to return- Parameters:
resourceClass- the resource class required- Returns:
- stream of matching resources
-
getResource
default <R> Optional<R> getResource(Class<R> resourceClass)
Get a single resource which matches.If there are multiple matches the underlying implementation may provide any back.
- Type Parameters:
R- the resource class to return- Parameters:
resourceClass- the resource class required- Returns:
- optional of matching resources
-
-