public class PipelineManager extends AbstractLogEnabled implements Component, Serviceable, Initializable, Disposable
PipelineDescriptor
sModifier and Type | Field and Description |
---|---|
private static String |
__NO_OP_PIPELINE_ID |
private Map<String,Long> |
_lastReading |
private PipelineDescriptor |
_noOpPipelineDesc |
private Map<String,PipelineDescriptor> |
_pipelineDescCache |
private SourceResolver |
_resolver |
private PipelineSerializerModelExtensionPoint |
_serializerEP |
static String |
ROLE
The Avalon role.
|
Constructor and Description |
---|
PipelineManager() |
Modifier and Type | Method and Description |
---|---|
private Path |
_absolutePath(String relativePath) |
private static Long |
_now() |
private void |
_readAll() |
private PipelineDescriptor |
_readAndGetPipeline(String id) |
private Pair<String,PipelineDescriptor> |
_readPipeline(Path pipelinePath) |
void |
dispose() |
PipelineDescriptor |
get(String id)
Gets the
PipelineDescriptor for the given id |
String |
getDefaultPipeline()
Gets the id of the default
PipelineDescriptor |
Map<String,I18nizableText> |
getEnumeration()
Gets all the
PipelineDescriptor s labels by id |
List<Map<String,Object>> |
getJsonEnumeration()
Gets all the
PipelineDescriptor s as JSON |
boolean |
has(String id)
Returns
true if the PipelineDescriptor for asked id exists |
void |
initialize() |
void |
service(ServiceManager manager) |
getLogger, setLogger
private static final String __NO_OP_PIPELINE_ID
private PipelineDescriptor _noOpPipelineDesc
private Map<String,PipelineDescriptor> _pipelineDescCache
private Map<String,Long> _lastReading
private SourceResolver _resolver
private PipelineSerializerModelExtensionPoint _serializerEP
public PipelineManager()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void dispose()
dispose
in interface Disposable
public boolean has(String id) throws IOException
true
if the PipelineDescriptor
for asked id existsid
- The id of the PipelineDescriptor
true
if the asked pipeline existsIOException
- if an I/O exception occured when accessing the root folder of pipeline filespublic PipelineDescriptor get(String id) throws IOException
PipelineDescriptor
for the given idid
- The id of the PipelineDescriptor
PipelineDescriptor
, or null if not foundIOException
- if an I/O exception occured when accessing the root folder of pipeline filespublic Map<String,I18nizableText> getEnumeration() throws IOException
PipelineDescriptor
s labels by idPipelineDescriptor
s labels by idIOException
- if an I/O exception occured when accessing the root folder of pipeline filespublic List<Map<String,Object>> getJsonEnumeration() throws IOException
PipelineDescriptor
s as JSONPipelineDescriptor
s as JSONIOException
- if an I/O exception occured when accessing the root folder of pipeline filespublic String getDefaultPipeline()
PipelineDescriptor
PipelineDescriptor
private PipelineDescriptor _readAndGetPipeline(String id) throws IOException
IOException
private void _readAll() throws IOException
IOException
private Path _absolutePath(String relativePath) throws IOException
IOException
private Pair<String,PipelineDescriptor> _readPipeline(Path pipelinePath)