public abstract class AbstractJavaAlgorithmBackend extends AbstractAlgorithmSourceBackend
AbstractAlgorithm.| Constructor and Description |
|---|
AbstractJavaAlgorithmBackend() |
AbstractJavaAlgorithmBackend(BackendInstanceSpec config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Implemented as a no-op.
|
protected Class<?> |
getAlgorithmClass(String name)
name is expected to be a fully-qualified class name in dot-format (e.g.,
my.algorithms.MockAlgorithm).
|
protected String |
getAlgorithmsPropertiesResourceName() |
void |
initialize(BackendInstanceSpec config)
Reads the properties file containing the list of algorithm classes.
|
Algorithm |
readAlgorithm(String id,
Algorithms algorithms)
Reads an algorithm from this backend.
|
void |
readAlgorithms(Algorithms algorithms)
Read the available algorithms.
|
fireAlgorithmSourceBackendUpdatedaddBackendListener, fireBackendUpdated, fireEvent, fireUnrecoverableError, getConfigurationsId, getId, removeBackendListener, setEventListeners, setIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBackendListener, getConfigurationsId, getDisplayName, getId, removeBackendListener, setEventListenerspublic AbstractJavaAlgorithmBackend()
public AbstractJavaAlgorithmBackend(BackendInstanceSpec config)
protected String getAlgorithmsPropertiesResourceName()
public final void initialize(BackendInstanceSpec config) throws BackendInitializationException
initialize in interface Backend<AlgorithmSourceBackendUpdatedEvent>initialize in class AbstractBackend<AlgorithmSourceBackendUpdatedEvent>config - the configuration Properties object.BackendInitializationExceptionpublic final Algorithm readAlgorithm(String id, Algorithms algorithms) throws AlgorithmSourceReadException
AlgorithmSourceBackendid - an algorithm id String.algorithms - an Algorithms object.Algorithm object or null if an
algorithm with the given id was not found.AlgorithmSourceReadException - when an error occurs reading the specified
algorithm.protected Class<?> getAlgorithmClass(String name) throws Exception
name - Exceptionpublic final void readAlgorithms(Algorithms algorithms) throws AlgorithmSourceReadException
AlgorithmSourceBackendalgorithms - an Algorithms object.AlgorithmSourceReadException - when an error occurs reading an algorithm.public void close()
AbstractAlgorithmSourceBackendclose in interface Backend<AlgorithmSourceBackendUpdatedEvent>close in class AbstractAlgorithmSourceBackendorg.protempa.AlgorithmSourceBackend#close()Copyright © 2012–2018 Emory University. All rights reserved.