org.crsh.plugin
Class ResourceManager

java.lang.Object
  extended by org.crsh.plugin.ResourceManager

 class ResourceManager
extends Object

Author:
Julien Viet

Field Summary
private  FS cmdFS
          .
private  FS confFS
          .
private  List<File> dirs
          .
private static Logger log
          .
private static Pattern p
          .
 
Constructor Summary
ResourceManager(FS cmdFS, FS confFS)
           
 
Method Summary
(package private)  List<String> listResourceId(ResourceKind kind)
          List the resources id for a specific resource kind.
(package private)  Resource loadResource(String resourceId, ResourceKind resourceKind)
          Load a resource from the context.
(package private)  void refresh()
          Refresh the fs system view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

private static final Pattern p
.


log

private static final Logger log
.


cmdFS

private final FS cmdFS
.


confFS

private final FS confFS
.


dirs

private volatile List<File> dirs
.

Constructor Detail

ResourceManager

public ResourceManager(FS cmdFS,
                       FS confFS)
Method Detail

loadResource

Resource loadResource(String resourceId,
                      ResourceKind resourceKind)
Load a resource from the context.

Parameters:
resourceId - the resource id
resourceKind - the resource kind
Returns:
the resource or null if it cannot be found

listResourceId

List<String> listResourceId(ResourceKind kind)
List the resources id for a specific resource kind.

Parameters:
kind - the resource kind
Returns:
the resource ids

refresh

void refresh()
Refresh the fs system view. This is normally triggered by the periodic job but it can be manually invoked to trigger explicit refreshes.



Copyright © 2014 eXo Platform SAS. All Rights Reserved.