|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ungoverned.oscar.OSGiURLPolicy
Constructor Summary | |
OSGiURLPolicy(Oscar oscar)
|
Method Summary | |
java.net.URL |
createCodeSourceURL(ModuleManager mgr,
Module module)
This method should return a URL that represents the location from which the module originated. |
java.net.URL |
createResourceURL(ModuleManager mgr,
Module module,
int rsIdx,
java.lang.String name)
This method should return a URL that is suitable for accessing the bytes of the specified resource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OSGiURLPolicy(Oscar oscar)
Method Detail |
public java.net.URL createCodeSourceURL(ModuleManager mgr, Module module)
URLPolicy
This method should return a URL that represents the location from which the module originated. This URL can be used when assigning permissions to the module, such as is done in the Java permissions policy file.
createCodeSourceURL
in interface URLPolicy
mgr
- the ModuleManager of the module.module
- the module for which the URL is to be created.
public java.net.URL createResourceURL(ModuleManager mgr, Module module, int rsIdx, java.lang.String name)
URLPolicy
This method should return a URL that is suitable for accessing the bytes of the specified resource. It must be possible open a connection to this URL, which may require that the implementer of this method also introduce a custom java.net.URLStreamHander when creating the URL.
createResourceURL
in interface URLPolicy
mgr
- the ModuleManager of the module.module
- the module for which the resource is being loaded.rsIdx
- the index of the ResourceSource containing the resource.name
- the name of the resource being loaded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |