public abstract class Engine extends Object implements Comparable<Engine>
An engine is in charge to parse a set of nuts. They are generally able to
parse an unique kind of type but the subclass could
supports several types.
Engines comparisons is based on their EngineType.
| Constructor and Description |
|---|
Engine() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Engine other) |
abstract EngineType |
getEngineType()
Gets the type of engine.
|
protected abstract List<ConvertibleNut> |
internalParse(EngineRequest request)
Internal method that parses eventually called by
NodeEngine.parse(EngineRequest) method during its invocation. |
abstract List<ConvertibleNut> |
parse(EngineRequest request)
Parses the given nuts and returns the result of this operation.
|
abstract Boolean |
works()
Returns a flag indicating if the engine is configured to do something or not.
|
public abstract EngineType getEngineType()
Gets the type of engine.
public abstract List<ConvertibleNut> parse(EngineRequest request) throws WuicException
Parses the given nuts and returns the result of this operation.
Should throw an IllegalArgumentException the files type is not supported by this Engine.
request - the request with nuts to parseWuicException - if any kind of error occursprotected abstract List<ConvertibleNut> internalParse(EngineRequest request) throws WuicException
Internal method that parses eventually called by NodeEngine.parse(EngineRequest) method during its invocation.
request - the request with files to parseWuicException - if any kind of error occurspublic abstract Boolean works()
Returns a flag indicating if the engine is configured to do something or not.
true is something will be done, false otherwisepublic final int compareTo(Engine other)
compareTo in interface Comparable<Engine>Copyright © 2012-2015. All Rights Reserved.