Class JsonRepository
java.lang.Object
org.apache.felix.utils.repository.BaseRepository
org.apache.felix.utils.repository.JsonRepository
- All Implemented Interfaces:
org.osgi.service.repository.Repository
Repository using a JSON representation of resource metadata.
The json should be a map: the key is the resource uri and the
value is a map of resource headers.
The content of the URL can be gzipped.
-
Field Summary
FieldsFields inherited from class org.apache.felix.utils.repository.BaseRepository
capSets, resources
Fields inherited from interface org.osgi.service.repository.Repository
URL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buildResource
(String uri, Map<String, String> headerMap) protected void
protected boolean
doRead
(InputStream is) Map
<org.osgi.resource.Requirement, Collection<org.osgi.resource.Capability>> findProviders
(Collection<? extends org.osgi.resource.Requirement> requirements) List
<org.osgi.resource.Resource> Methods inherited from class org.apache.felix.utils.repository.BaseRepository
addResource, findProviders, getExpressionCombiner, newRequirementBuilder
-
Field Details
-
loader
-
lock
-
-
Constructor Details
-
JsonRepository
-
-
Method Details
-
getResources
- Overrides:
getResources
in classBaseRepository
-
findProviders
public Map<org.osgi.resource.Requirement,Collection<org.osgi.resource.Capability>> findProviders(Collection<? extends org.osgi.resource.Requirement> requirements) - Specified by:
findProviders
in interfaceorg.osgi.service.repository.Repository
- Overrides:
findProviders
in classBaseRepository
-
checkAndLoadCache
protected void checkAndLoadCache() -
doRead
- Throws:
IOException
-
buildResource
- Throws:
IOException
-
verify
-