public abstract class BaseResourceProvider extends BaseRestletProvider implements ResourceProvider
ResourceProvider
. You
register this class as an OSGi declarative service. It is expected that
clients will extend this class to create the Finder for the resource. This
allows the OSGi class loading mechanism to properly locate the resource
class. The service declaration should look like:
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.example.app.resource">
<implementation class="org.restlet.ext.osgi.BaseResourceProvider"/>
<service>
<provide interface="org.restlet.ext.osgi.ResourceProvider"/>
</service>
</scr:component>
The service properties are:
The referenced services are:
The provided services are:
Constructor and Description |
---|
BaseResourceProvider() |
Modifier and Type | Method and Description |
---|---|
void |
activate(org.osgi.service.component.ComponentContext context)
Called by OSGi DS to activate the service
|
protected abstract Finder |
createFinder(Context context) |
protected Restlet |
getFilteredRestlet()
Called by getInboundRoot() to determine the filtered restlet that is next
in the chain.
|
Restlet |
getInboundRoot(Context context) |
int |
getMatchingMode() |
java.lang.String[] |
getPaths() |
bindFilterProvider, unbindFilterProvider
public void activate(org.osgi.service.component.ComponentContext context)
context
- the OSGi service contextprotected abstract Finder createFinder(Context context)
the
- restlet application contextprotected Restlet getFilteredRestlet()
BaseRestletProvider
getFilteredRestlet
in class BaseRestletProvider
public Restlet getInboundRoot(Context context)
getInboundRoot
in interface RestletProvider
getInboundRoot
in class BaseRestletProvider
context
- the Restlet application contextpublic int getMatchingMode()
getMatchingMode
in interface ResourceProvider
public java.lang.String[] getPaths()
getPaths
in interface ResourceProvider
Copyright © 2005-2020 Restlet.