public abstract class BasicResourceProvider extends java.lang.Object implements ResourceProviderService
Modifier and Type | Field and Description |
---|---|
protected org.osgi.framework.BundleContext |
context
The bundle context
|
protected Logger |
logger
A logger instance
|
protected java.util.Map<java.lang.String,java.lang.String> |
properties
Service properties
|
Constructor and Description |
---|
BasicResourceProvider() |
Modifier and Type | Method and Description |
---|---|
void |
activate(org.osgi.framework.BundleContext context,
java.util.Map<java.lang.String,java.lang.String> properties)
Called when the service is activated
|
@Nullable javafx.scene.image.Image |
getImage(@NonNull java.lang.String key)
Get the image with the given key
|
protected java.util.Map<java.lang.String,java.lang.String> properties
protected org.osgi.framework.BundleContext context
protected Logger logger
public void activate(org.osgi.framework.BundleContext context, java.util.Map<java.lang.String,java.lang.String> properties)
context
- the bundle contextproperties
- the propertiespublic @Nullable javafx.scene.image.Image getImage(@NonNull java.lang.String key) throws java.io.IOException
ResourceProviderService
getImage
in interface ResourceProviderService
key
- the keyjava.io.IOException
- in case something goes wrong