Interface ICoreContext
- All Superinterfaces:
IEventSource
There must be at most one core context running within a JVM. Use JebCoreService
to
retrieve or create the core context.
The first thing a client does is instantiate or retrieve a context to the core.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Terminate this core context.void
closeEnginesContext
(IEnginesContext context) Close an engines contextcreateEnginesContext
(IDataProvider dataProvider, JebClientInformation clientInformation) Create an engines context.Retrieve the first, aka default, JEB engines context.Retrieve the core options.Get the version of this core.List<? extends IEnginesContext>
Retrieve the list of engines contexts managed by the core.Methods inherited from interface com.pnfsoftware.jeb.util.events.IEventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, removeListener, setParentSource
-
Method Details
-
getOptions
CoreOptions getOptions()Retrieve the core options.- Returns:
-
getVersion
Version getVersion()Get the version of this core.- Returns:
- the version, never null
-
close
void close()Terminate this core context. -
createEnginesContext
IEnginesContext createEnginesContext(IDataProvider dataProvider, JebClientInformation clientInformation) throws JebException Create an engines context.When an engines context is created, all unit identifiers are enabled. Currently, the implementation of engines context uses a static pool for identifiers; that means that creating an engine context will impact previously created ones: identifiers that may have been disabled will be re-enable. In production code, this limitation is theoretical since only a single engines context instance should instance at any given point.
- Parameters:
dataProvider
- mandatory data providerclientInformation
- client information- Returns:
- the engines context
- Throws:
JebException
- on error
-
listEnginesContexts
List<? extends IEnginesContext> listEnginesContexts()Retrieve the list of engines contexts managed by the core.- Returns:
- the engines context
-
getDefaultEnginesContexts
IEnginesContext getDefaultEnginesContexts()Retrieve the first, aka default, JEB engines context.If JEB has not initialized properly, this method will return null, as there may not be any engines context. JEB core back-end normally manages a single engines context, even though there may be (in exceptional circumstances) more than a single.
- Returns:
-
closeEnginesContext
Close an engines context- Parameters:
context
- the engines context
-