|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.qedeq.kernel.bo.service.internal.DefaultInternalKernelServices
public class DefaultInternalKernelServices
This class provides a default implementation for the QEDEQ module services.
Constructor Summary | |
---|---|
DefaultInternalKernelServices(QedeqConfig config,
KernelProperties kernel,
QedeqFileDao loader)
Constructor. |
Method Summary | |
---|---|
void |
addPlugin(java.lang.String pluginClass)
Add plugin to services. |
boolean |
checkFormallyProved(InternalServiceJob process,
KernelQedeqBo qedeq)
Check if all propositions of this and all required modules have correct formal proofs. |
boolean |
checkFormallyProved(ModuleAddress address)
Check if all propositions of this and all required modules have correct formal proofs. |
boolean |
checkWellFormedness(InternalServiceJob process,
KernelQedeqBo qedeq)
Check if all formulas of a QEDEQ module and its required modules are well formed. |
boolean |
checkWellFormedness(ModuleAddress address)
Check if all formulas of a QEDEQ module and its required modules are well formed. |
void |
clearAllPluginResults(ModuleAddress address)
Clear all plugin warnings and errors for given module. |
boolean |
clearLocalBuffer()
Clear local file buffer and all loaded QEDEQ modules. |
SourceFileExceptionList |
createSourceFileExceptionList(int code,
java.lang.String message,
java.lang.String address,
java.lang.Exception e)
Creates a list with a SourceFileException with dummy
position. |
SourceFileExceptionList |
createSourceFileExceptionList(int code,
java.lang.String message,
java.lang.String address,
java.io.IOException e)
Creates a list with a SourceFileException with dummy
position. |
SourceFileExceptionList |
createSourceFileExceptionList(int code,
java.lang.String message,
java.lang.String address,
java.lang.RuntimeException e)
Creates a list with a SourceFileException with dummy
position. |
java.lang.Object |
executePlugin(InternalServiceJob process,
java.lang.String id,
KernelQedeqBo qedeq,
java.lang.Object data)
Execute plugin on given QEDEQ module. |
java.lang.Object |
executePlugin(java.lang.String id,
ModuleAddress address,
java.lang.Object data)
Execute plugin on given QEDEQ module. |
ModuleAddress[] |
getAllLoadedModules()
Get list of all currently loaded QEDEQ modules. |
java.io.File |
getBufferDirectory()
Get buffer directory for QEDEQ module files. |
java.lang.String |
getBuildId()
Get build information. |
QedeqConfig |
getConfig()
Get access to configuration parameters. |
ContextChecker |
getContextChecker()
Get context checker. |
java.lang.String |
getDedication()
Get dedication for this kernel. |
java.lang.String |
getDescriptiveKernelVersion()
Get descriptive version information of this kernel. |
java.io.File |
getGenerationDirectory()
Get directory for generated files. |
java.lang.String |
getKernelCodeName()
Get code name of this kernel. |
KernelQedeqBo |
getKernelQedeqBo(ModuleAddress address)
Get KernelQedeqBo for an address. |
java.lang.String |
getKernelVersion()
Get version of this kernel. |
java.lang.String |
getKernelVersionDirectory()
Get relative version directory of this kernel. |
java.io.File |
getLocalFilePath(ModuleAddress address)
Transform an URL address into a local file path where the QEDEQ module is buffered. |
java.lang.String |
getMaximalRuleVersion()
Get maximal supported rule version of this kernel. |
ModuleAddress |
getModuleAddress(java.io.File file)
Get module address from URL. |
ModuleAddress |
getModuleAddress(java.lang.String url)
Get module address from URL. |
ModuleAddress |
getModuleAddress(java.net.URL url)
Get module address from URL. |
ModuleService[] |
getPlugins()
Get all installed plugins. |
QedeqBo |
getQedeqBo(ModuleAddress address)
Get QedeqBo for an address. |
QedeqFileDao |
getQedeqFileDao()
Get DAO for reading and writing QEDEQ modules from or to a file. |
ServiceJob[] |
getRunningServiceProcesses()
Get all running service processes. |
java.lang.String |
getServiceAction()
Get service action name. |
java.lang.String |
getServiceDescription()
Get service description. |
java.lang.String |
getServiceId()
Get service id. |
ServiceJob[] |
getServiceProcesses()
Get information about all service processes. |
java.lang.String |
getSource(ModuleAddress address)
Get source of an QEDEQ module. |
java.lang.String[] |
getSourceFileExceptionList(ModuleAddress address)
Get description of source file exception list. |
boolean |
isRuleVersionSupported(java.lang.String ruleVersion)
Is a given rule version supported? |
boolean |
isSetConnectionTimeOutSupported()
Does URLConnection support the method setConnectionTimeOut
in the currently running JVM. |
boolean |
isSetReadTimeoutSupported()
Does URLConnection support the method setReadTimeOut
in the currently running JVM. |
boolean |
loadAllModulesFromQedeq()
Load all QEDEQ modules from project web directory for current kernel. |
KernelQedeqBo |
loadKernelModule(InternalServiceJob process,
ModuleAddress address)
Load QEDEQ module. |
KernelQedeqBo |
loadKernelModule(InternalServiceJob process,
ModuleAddress parent,
Specification spec)
Load specified QEDEQ module from QEDEQ parent module. |
QedeqBo |
loadModule(ModuleAddress address)
Get a certain module. |
boolean |
loadPreviouslySuccessfullyLoadedModules()
Load all previously checked QEDEQ modules. |
boolean |
loadRequiredModules(InternalServiceJob process,
KernelQedeqBo qedeq)
Get required modules of given module. |
boolean |
loadRequiredModules(ModuleAddress address)
Get required modules of given module. |
boolean |
removeAllModules()
Remove all modules from memory. |
void |
removeModule(ModuleAddress address)
Remove a QEDEQ module from memory. |
void |
setContextChecker(ContextChecker contextChecker)
Set the context checker. |
void |
shutdownServices()
Shutdown of services. |
void |
startupServices()
Initialization of services. |
void |
terminateAllServiceProcesses()
Stop all currently running service executions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultInternalKernelServices(QedeqConfig config, KernelProperties kernel, QedeqFileDao loader)
config
- For config access.kernel
- For kernel properties.loader
- For loading QEDEQ modules.Method Detail |
---|
public void startupServices()
Kernel
startupServices
in interface Kernel
public void shutdownServices()
Kernel
shutdownServices
in interface Kernel
public boolean removeAllModules()
KernelServices
removeAllModules
in interface KernelServices
public void removeModule(ModuleAddress address)
KernelServices
removeModule
in interface KernelServices
address
- Remove module identified by this address.public boolean clearLocalBuffer()
clearLocalBuffer
in interface KernelServices
public KernelQedeqBo loadKernelModule(InternalServiceJob process, ModuleAddress address) throws InterruptException
InternalKernelServices
loadKernelModule
in interface InternalKernelServices
process
- Working process.address
- Load module from this address.
InterruptException
- User canceled request.public QedeqBo loadModule(ModuleAddress address)
KernelServices
loadModule
in interface KernelServices
address
- Address of module.
public KernelQedeqBo loadKernelModule(InternalServiceJob process, ModuleAddress parent, Specification spec) throws SourceFileExceptionList, InterruptException
loadKernelModule
in interface InternalKernelServices
process
- Our service process we run within.parent
- Parent module address.spec
- Specification for another QEDEQ module.
SourceFileExceptionList
- Loading failed.
InterruptException
- User canceled request.public ModuleAddress[] getAllLoadedModules()
KernelServices
getAllLoadedModules
in interface KernelServices
public boolean loadPreviouslySuccessfullyLoadedModules()
public boolean loadAllModulesFromQedeq()
KernelServices
loadAllModulesFromQedeq
in interface KernelServices
public final java.io.File getLocalFilePath(ModuleAddress address)
InternalKernelServices
getLocalFilePath
in interface InternalKernelServices
address
- Get local address for this QEDEQ module address.
address
.public java.io.File getBufferDirectory()
InternalKernelServices
getBufferDirectory
in interface InternalKernelServices
public java.io.File getGenerationDirectory()
InternalKernelServices
getGenerationDirectory
in interface InternalKernelServices
public KernelQedeqBo getKernelQedeqBo(ModuleAddress address)
InternalKernelServices
KernelQedeqBo
for an address.
getKernelQedeqBo
in interface InternalKernelServices
address
- Look for this address.
KernelQedeqBo
. Never null
.public QedeqBo getQedeqBo(ModuleAddress address)
KernelServices
QedeqBo
for an address.
getQedeqBo
in interface KernelServices
address
- Look for this address.
QedeqBo
.public ModuleAddress getModuleAddress(java.net.URL url) throws java.io.IOException
KernelServices
getModuleAddress
in interface KernelServices
url
- URL for QEDEQ module.
java.io.IOException
- URL has not the correct format for referencing a QEDEQ module.public ModuleAddress getModuleAddress(java.lang.String url) throws java.io.IOException
KernelServices
getModuleAddress
in interface KernelServices
url
- URL for QEDEQ module.
java.io.IOException
- URL has not the correct format for referencing a QEDEQ module.public ModuleAddress getModuleAddress(java.io.File file) throws java.io.IOException
KernelServices
getModuleAddress
in interface KernelServices
file
- Local QEDEQ module.
java.io.IOException
- URL has not the correct format for referencing a QEDEQ module.public java.lang.String getSource(ModuleAddress address) throws java.io.IOException
KernelServices
null
is returned.
getSource
in interface KernelServices
address
- Address for QEDEQ module address.
java.io.IOException
- Loading failed.public boolean loadRequiredModules(ModuleAddress address)
KernelServices
loadRequiredModules
in interface KernelServices
address
- Address of module.
public boolean loadRequiredModules(InternalServiceJob process, KernelQedeqBo qedeq) throws InterruptException
InternalKernelServices
loadRequiredModules
in interface InternalKernelServices
process
- Working process.qedeq
- Module to check.
InterruptException
- User canceled request.public boolean checkWellFormedness(ModuleAddress address)
KernelServices
checkWellFormedness
in interface KernelServices
address
- Module to check.
public boolean checkWellFormedness(InternalServiceJob process, KernelQedeqBo qedeq) throws InterruptException
InternalKernelServices
checkWellFormedness
in interface InternalKernelServices
process
- Working process.qedeq
- Module to check.
InterruptException
- User canceled request.public boolean checkFormallyProved(ModuleAddress address)
KernelServices
checkFormallyProved
in interface KernelServices
address
- Module to check.
public boolean checkFormallyProved(InternalServiceJob process, KernelQedeqBo qedeq) throws InterruptException
InternalKernelServices
checkFormallyProved
in interface InternalKernelServices
process
- Working process.qedeq
- Module to check.
InterruptException
- Process execution was canceled by user.public void addPlugin(java.lang.String pluginClass)
pluginClass
- Plugin class to instantiate.
java.lang.RuntimeException
- Addition failed.public ModuleService[] getPlugins()
KernelServices
getPlugins
in interface KernelServices
public java.lang.Object executePlugin(java.lang.String id, ModuleAddress address, java.lang.Object data)
KernelServices
executePlugin
in interface KernelServices
id
- Plugin id.address
- QEDEQ module address.data
- Process data. Additional data beside module.
null
.public java.lang.Object executePlugin(InternalServiceJob process, java.lang.String id, KernelQedeqBo qedeq, java.lang.Object data) throws InterruptException
InternalKernelServices
executePlugin
in interface InternalKernelServices
process
- Parent service process. Must not be null
id
- Plugin id.qedeq
- QEDEQ module.data
- Process data. Additional data beside module.
null
.
InterruptException
- Process execution was canceled by user.public void clearAllPluginResults(ModuleAddress address)
KernelServices
clearAllPluginResults
in interface KernelServices
address
- QEDEQ module address.public ServiceJob[] getServiceProcesses()
KernelServices
getServiceProcesses
in interface KernelServices
public ServiceJob[] getRunningServiceProcesses()
KernelServices
getRunningServiceProcesses
in interface KernelServices
public void terminateAllServiceProcesses()
KernelServices
terminateAllServiceProcesses
in interface KernelServices
public SourceFileExceptionList createSourceFileExceptionList(int code, java.lang.String message, java.lang.String address, java.io.IOException e)
InternalKernelServices
SourceFileException
with dummy
position.
createSourceFileExceptionList
in interface InternalKernelServices
code
- Failure code.message
- Textual description of failure.address
- This source had a problem.e
- Wrapped exception.
public SourceFileExceptionList createSourceFileExceptionList(int code, java.lang.String message, java.lang.String address, java.lang.RuntimeException e)
InternalKernelServices
SourceFileException
with dummy
position.
createSourceFileExceptionList
in interface InternalKernelServices
code
- Failure code.message
- Textual description of failure.address
- This source had a problem.e
- Wrapped exception.
public SourceFileExceptionList createSourceFileExceptionList(int code, java.lang.String message, java.lang.String address, java.lang.Exception e)
InternalKernelServices
SourceFileException
with dummy
position.
createSourceFileExceptionList
in interface InternalKernelServices
code
- Failure code.message
- Textual description of failure.address
- This source had a problem.e
- Wrapped exception.
public java.lang.String[] getSourceFileExceptionList(ModuleAddress address)
address
- Get description for this module exceptions.
public java.lang.String getServiceId()
Service
getServiceId
in interface Service
public java.lang.String getServiceAction()
Service
getServiceAction
in interface Service
public QedeqFileDao getQedeqFileDao()
InternalKernelServices
getQedeqFileDao
in interface InternalKernelServices
public java.lang.String getServiceDescription()
Service
getServiceDescription
in interface Service
public QedeqConfig getConfig()
InternalKernelServices
getConfig
in interface InternalKernelServices
public java.lang.String getKernelVersionDirectory()
KernelProperties
getKernelVersionDirectory
in interface KernelProperties
public java.lang.String getBuildId()
KernelProperties
getBuildId
in interface KernelProperties
public java.lang.String getDedication()
KernelProperties
getDedication
in interface KernelProperties
public java.lang.String getDescriptiveKernelVersion()
KernelProperties
getDescriptiveKernelVersion
in interface KernelProperties
public java.lang.String getKernelCodeName()
KernelProperties
getKernelCodeName
in interface KernelProperties
public java.lang.String getKernelVersion()
KernelProperties
getKernelVersion
in interface KernelProperties
public java.lang.String getMaximalRuleVersion()
KernelProperties
getMaximalRuleVersion
in interface KernelProperties
public boolean isRuleVersionSupported(java.lang.String ruleVersion)
KernelProperties
isRuleVersionSupported
in interface KernelProperties
ruleVersion
- Check this one.
public boolean isSetConnectionTimeOutSupported()
KernelProperties
URLConnection
support the method setConnectionTimeOut
in the currently running JVM. This should be true since version 1.5 but false for 1.4.2.
isSetConnectionTimeOutSupported
in interface KernelProperties
public boolean isSetReadTimeoutSupported()
KernelProperties
URLConnection
support the method setReadTimeOut
in the currently running JVM. This should be true since version 1.5 but false for 1.4.2.
isSetReadTimeoutSupported
in interface KernelProperties
public ContextChecker getContextChecker()
InternalKernelServices
getContextChecker
in interface InternalKernelServices
public void setContextChecker(ContextChecker contextChecker)
contextChecker
- We check the context with this checker now.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |