Package io.micronaut.eclipsestore.rest
Class DefaultEclipseStoreRestService
java.lang.Object
io.micronaut.eclipsestore.rest.DefaultEclipseStoreRestService
- All Implemented Interfaces:
EclipseStoreRestService
@Singleton
public class DefaultEclipseStoreRestService
extends Object
implements EclipseStoreRestService
Default implementation of
EclipseStoreRestService
.- Since:
- 1.0.0
- Author:
- Tim Yates
-
Constructor Summary
ConstructorDescriptionDefaultEclipseStoreRestService
(io.micronaut.context.BeanContext beanContext, Collection<RootClassConfigurationProvider> storageFoundations) Creates a service that allows us to query storage managers by name. -
Method Summary
Modifier and TypeMethodDescription@NonNull org.eclipse.store.storage.restadapter.types.StorageRestAdapter
getAdapter
(@NonNull String name) Get the single adapter for a given storage name.@NonNull Optional<org.eclipse.store.storage.restadapter.types.StorageRestAdapter>
Returns a single adaptor if only one is available.
-
Constructor Details
-
DefaultEclipseStoreRestService
public DefaultEclipseStoreRestService(io.micronaut.context.BeanContext beanContext, Collection<RootClassConfigurationProvider> storageFoundations) Creates a service that allows us to query storage managers by name.- Parameters:
beanContext
- the bean context to resolve storage managersstorageFoundations
- the bound storage foundations
-
-
Method Details
-
getAdapter
@NonNull public @NonNull org.eclipse.store.storage.restadapter.types.StorageRestAdapter getAdapter(@NonNull @NonNull String name) Description copied from interface:EclipseStoreRestService
Get the single adapter for a given storage name.- Specified by:
getAdapter
in interfaceEclipseStoreRestService
- Parameters:
name
- the storage name- Returns:
- the adapter
-
singleAdapter
@NonNull public @NonNull Optional<org.eclipse.store.storage.restadapter.types.StorageRestAdapter> singleAdapter()Description copied from interface:EclipseStoreRestService
Returns a single adaptor if only one is available.- Specified by:
singleAdapter
in interfaceEclipseStoreRestService
- Returns:
- The adaptor if only one is defined, or an empty optional if multiple are defined.
-