public abstract class AbstractPrologEngineDriver<T extends PrologEngine> extends Object implements PrologEngineDriver<T>
Modifier and Type | Field and Description |
---|---|
static String |
JAVA_SIDE_EXCEPTION_SPECIFIER |
Constructor and Description |
---|
AbstractPrologEngineDriver(EngineDescription engineDescription) |
AbstractPrologEngineDriver(EngineDescription engineDescription,
JpcPreferences preferences)
A PrologDriver may be instantiated with incomplete information.
|
Modifier and Type | Method and Description |
---|---|
void |
addStateListener(DriverStateListener listener) |
T |
createPrologEngine() |
protected T |
createPrologEngine(PrologEngineFactory<T> basicFactory) |
protected abstract PrologEngineFactory<T> |
defaultBasicFactory() |
String |
getDescription() |
EngineDescription |
getEngineDescription() |
abstract String |
getLibraryName() |
String |
getLicenseUrl() |
protected Collection<DriverStateListener> |
getListeners()
Subclasses may override this method to provide a convenient representation of the state listeners.
|
JpcPreferences |
getPreferences() |
String |
getShortDescription() |
String |
getSiteUrl() |
boolean |
isDisabled()
Answers if the driver is disabled (cannot create a Prolog Engine session) or enabled.
|
protected void |
notifyDisabledState()
Notify the listeners that the state of this driver is now disabled
|
protected void |
onCreate(PrologEngine prologEngine)
Invoked immediately after a Prolog engine abstraction has been created.
|
protected void |
readyOrThrow() |
void |
removeStateListener(DriverStateListener listener) |
String |
toString() |
public static final String JAVA_SIDE_EXCEPTION_SPECIFIER
public AbstractPrologEngineDriver(EngineDescription engineDescription)
public AbstractPrologEngineDriver(EngineDescription engineDescription, JpcPreferences preferences)
preferences
- public JpcPreferences getPreferences()
public boolean isDisabled()
isDisabled
in interface PrologEngineDriver<T extends PrologEngine>
protected abstract PrologEngineFactory<T> defaultBasicFactory()
public final T createPrologEngine()
createPrologEngine
in interface PrologEngineFactory<T extends PrologEngine>
protected T createPrologEngine(PrologEngineFactory<T> basicFactory)
protected void readyOrThrow()
protected void onCreate(PrologEngine prologEngine)
prologEngine
- protected void notifyDisabledState()
public void addStateListener(DriverStateListener listener)
addStateListener
in interface PrologEngineDriver<T extends PrologEngine>
public void removeStateListener(DriverStateListener listener)
removeStateListener
in interface PrologEngineDriver<T extends PrologEngine>
protected Collection<DriverStateListener> getListeners()
public String getShortDescription()
getShortDescription
in interface PrologEngineDriver<T extends PrologEngine>
public String getDescription()
getDescription
in interface PrologEngineDriver<T extends PrologEngine>
public abstract String getLibraryName()
getLibraryName
in interface PrologEngineDriver<T extends PrologEngine>
public EngineDescription getEngineDescription()
getEngineDescription
in interface PrologEngineDriver<T extends PrologEngine>
public String getLicenseUrl()
getLicenseUrl
in interface PrologEngineDriver<T extends PrologEngine>
public String getSiteUrl()
getSiteUrl
in interface PrologEngineDriver<T extends PrologEngine>
Copyright © 2014. All rights reserved.