org.crsh.plugin
Class ResourceManager

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

public 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
          .
private static byte[] SEPARATOR
          .
 
Constructor Summary
ResourceManager(FS cmdFS, FS confFS)
           
 
Method Summary
(package private)  Iterable<String> listResourceId(ResourceKind kind)
          List the resources id for a specific resource kind.
static Resource loadConf(File file)
           
(package private)  Iterable<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
.


SEPARATOR

private static final byte[] SEPARATOR
.

Constructor Detail

ResourceManager

ResourceManager(FS cmdFS,
                FS confFS)
Method Detail

loadResource

Iterable<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

Iterable<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.


loadConf

public static Resource loadConf(File file)
                         throws IOException
Throws:
IOException


Copyright © 2015 eXo Platform SAS. All Rights Reserved.