|
Restlet Framework 2.2.3 OSGi Environments |
|||||||||
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.BaseDirectoryProvider
public class BaseDirectoryProvider
This class provides an implementation of DirectoryProvider
. You
register this class as an OSGi declarative service. 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.directory">
<implementation class="org.restlet.ext.osgi.BaseDirectoryProvider"/>
<property name="path" type="String" value="/myDir"/>
<property name="rootUri" type="String" value="file:/Path/to/dir"/>
<service>
<provide interface="org.restlet.ext.osgi.DirectoryProvider"/>
</service>
</scr:component>
The service properties are:
The referenced services are:
The provided services are:
Constructor Summary | |
---|---|
BaseDirectoryProvider()
|
Method Summary | |
---|---|
void |
activate(org.osgi.service.component.ComponentContext context)
Called by OSGi DS to activate the service |
protected Directory |
createDirectory(Context context)
Creates the Restlet Directory instance using the rootUri, indexName, deeplyAccessible, modifiable, and negotiatingContent service properties |
protected Restlet |
getFilteredRestlet()
Called by getInboundRoot() to determine the filtered restlet that is next in the chain. |
Restlet |
getInboundRoot(Context context)
|
String |
getPath()
|
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 BaseDirectoryProvider()
Method Detail |
---|
public void activate(org.osgi.service.component.ComponentContext context)
context
- the OSGi service contextprotected Directory createDirectory(Context 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 getPath()
getPath
in interface DirectoryProvider
|
Restlet Framework 2.2.3 OSGi Environments |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |