|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.ext.osgi.BaseRestletProvider
org.restlet.ext.osgi.BaseResourceProvider
public abstract class BaseResourceProvider
This class provides an implementation of 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 Summary | |
---|---|
BaseResourceProvider()
|
Method Summary | |
---|---|
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()
|
String[] |
getPaths()
|
Methods inherited from class org.restlet.ext.osgi.BaseRestletProvider |
---|
bindFilterProvider, unbindFilterProvider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseResourceProvider()
Method Detail |
---|
public void activate(org.osgi.service.component.ComponentContext context)
context
- the OSGi service contextprotected abstract Finder createFinder(Context context)
the
- restlet application context
protected Restlet getFilteredRestlet()
BaseRestletProvider
getFilteredRestlet
in class BaseRestletProvider
public Restlet getInboundRoot(Context context)
getInboundRoot
in interface RestletProvider
getInboundRoot
in class BaseRestletProvider
context
- the Restlet application context
public String[] getPaths()
getPaths
in interface ResourceProvider
public int getMatchingMode()
getMatchingMode
in interface ResourceProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |