org.rhq.bindings.util
Class MultiScriptSourceProvider

java.lang.Object
  extended by org.rhq.bindings.util.MultiScriptSourceProvider
All Implemented Interfaces:
ScriptSourceProvider

public class MultiScriptSourceProvider
extends Object
implements ScriptSourceProvider

An implementation of the script source provider that uses a collection of another providers to locate the scripts.

The providers are tried in the order they were supplied to the constructor of this class and the first script source provider that manages to provide a non-null reader for given URI "wins".

Author:
Lukas Krejci

Constructor Summary
MultiScriptSourceProvider(Collection<? extends ScriptSourceProvider> providers)
           
MultiScriptSourceProvider(ScriptSourceProvider... providers)
           
 
Method Summary
 Reader getScriptSource(URI scriptUri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiScriptSourceProvider

public MultiScriptSourceProvider(Collection<? extends ScriptSourceProvider> providers)

MultiScriptSourceProvider

public MultiScriptSourceProvider(ScriptSourceProvider... providers)
Method Detail

getScriptSource

public Reader getScriptSource(URI scriptUri)
Specified by:
getScriptSource in interface ScriptSourceProvider


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.