org.crsh.plugin
Class ServiceLoaderDiscovery

java.lang.Object
  extended by org.crsh.plugin.ServiceLoaderDiscovery
All Implemented Interfaces:
PluginDiscovery

public class ServiceLoaderDiscovery
extends Object
implements PluginDiscovery

An implementation of PluginDiscovery based on ServiceLoader.

Author:
Julien Viet

Field Summary
private  ClassLoader classLoader
          .
private static org.slf4j.Logger log
          .
 
Constructor Summary
ServiceLoaderDiscovery(ClassLoader classLoader)
          Create a new instance.
 
Method Summary
 Iterable<CRaSHPlugin<?>> getPlugins()
          Returns the available plugins.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.slf4j.Logger log
.


classLoader

private final ClassLoader classLoader
.

Constructor Detail

ServiceLoaderDiscovery

public ServiceLoaderDiscovery(ClassLoader classLoader)
                       throws NullPointerException
Create a new instance.

Parameters:
classLoader - the loader for the discovery
Throws:
NullPointerException - if the loader argument is null
Method Detail

getPlugins

public Iterable<CRaSHPlugin<?>> getPlugins()
Description copied from interface: PluginDiscovery
Returns the available plugins.

Specified by:
getPlugins in interface PluginDiscovery
Returns:
the plugins


Copyright © 2012 eXo Platform SAS. All Rights Reserved.