Package systems.dmx.core.impl
Class PluginImpl
- java.lang.Object
-
- systems.dmx.core.impl.PluginImpl
-
-
Constructor Summary
Constructors Constructor Description PluginImpl(PluginContext pluginContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getStaticResource(String name)
Accesses a static resource of the plugin.String
getUri()
void
handleEvent(org.osgi.service.event.Event event)
boolean
hasStaticResource(String name)
Checks if this plugin bundle contains a static resource with the given name.void
publishFileSystem(String uriNamespace, String path)
Publishes a directory of the server's file system.void
start()
void
stop()
String
toString()
-
-
-
Constructor Detail
-
PluginImpl
public PluginImpl(PluginContext pluginContext)
-
-
Method Detail
-
start
public void start()
-
stop
public void stop()
-
publishFileSystem
public void publishFileSystem(String uriNamespace, String path)
Publishes a directory of the server's file system.- Parameters:
path
- An absolute path to the directory to be published.
-
getUri
public String getUri()
-
getStaticResource
public InputStream getStaticResource(String name)
Description copied from interface:Plugin
Accesses a static resource of the plugin. A static resource is some data (images, audio, text, etc) that is contained in the plugin bundle (that is the jar file).- Specified by:
getStaticResource
in interfacePlugin
- Parameters:
name
- The resource name: a "/"-separated path name, relative to the plugin bundle's root directory. It may or may not begin with "/" (it makes no difference).- Returns:
- An InputStream to read the static resource content.
-
hasStaticResource
public boolean hasStaticResource(String name)
Description copied from interface:Plugin
Checks if this plugin bundle contains a static resource with the given name.- Specified by:
hasStaticResource
in interfacePlugin
- Parameters:
name
- The resource name: a "/"-separated path name, relative to the plugin bundle's root directory. It may or may not begin with "/" (it makes no difference).
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event)
- Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-
-