public interface

IEnginesContext

implements IEventSource
com.pnfsoftware.jeb.core.IEnginesContext

Class Overview

A context for JEB engines. Engines produce events and relay events from other components under their supervision. The primary task of JEB engines is to manage projects.

See Also

Summary

Constants
String PreserveForwardCompatibility
Public Methods
abstract void close()
Close the context.
abstract IDataProvider getDataProvider()
Get a reference to the DAO.
abstract List<IDebuggerUnitIdentifier> getDebuggerUnitIdentifiers()
Retrieve the list of identifiers specifically for debugger units.
abstract List<IEnginesPlugin> getEnginesPlugins()
Retrieve a list of engines plugins (internal modules, third party plugins).
abstract ExecutorService getExecutorService()
Get the executor service used by this context.
abstract NativeSignatureDBManager getNativeSignatureDBManager()
Retrieve the native signature DB manager managed by this context.
abstract INet getNetworkUtility()
Retrieve a network utility object used by this engines context.
abstract IRuntimeProject getProject(String key)
Get a project by key.
abstract IRuntimeProject getProject(int index)
Get a project by index.
abstract List<IRuntimeProject> getProjects()
Retrieve a copy of the list of projects currently loaded within this context.
abstract IPropertyManager getPropertyManager()
Get the property manager for this engines context.
abstract TypeLibraryService getTypeLibraryService()
Retrieve the type library service managed by this context.
abstract List<IUnitIdentifier> getUnitIdentifiers()
Retrieve the list of all identifiers that projects managed by this context may have access to.
abstract boolean isIdentifierEnabled(IUnitIdentifier identifier)
Determine if an identifier is enabled.
abstract IRuntimeProject loadProject(String key)
Load an existing project or create a new project.
abstract IRuntimeProject loadProject(String key, IProgressCallback callback)
Load an existing project or create a new project.
abstract boolean saveProject(String projectKey, String persistenceKey, Map<String, Object> optionalParameters)
Save the state of a project (including artifacts and all units) to the project database.
abstract boolean saveProject(String key)
Save the state of a project (including artifacts and all units) to the project database.
abstract boolean setIdentifierEnabled(IUnitIdentifier identifier, boolean enabled)
Enable or disable an identifier.
abstract boolean unloadProject(String key)
Unload a project.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.util.events.IEventSource

Constants

public static final String PreserveForwardCompatibility

Constant Value: "PreserveForwardCompatibility"

Public Methods

public abstract void close ()

Close the context. All projects will be unloaded; changes will not be persisted.

public abstract IDataProvider getDataProvider ()

Get a reference to the DAO.

Returns
  • the data provider

public abstract List<IDebuggerUnitIdentifier> getDebuggerUnitIdentifiers ()

Retrieve the list of identifiers specifically for debugger units.

Returns
  • a list of debugger identifiers

public abstract List<IEnginesPlugin> getEnginesPlugins ()

Retrieve a list of engines plugins (internal modules, third party plugins).

Returns
  • the list of plugins, never null

public abstract ExecutorService getExecutorService ()

Get the executor service used by this context. Clients may use it to schedule third-party tasks.

Returns
  • the executor service

public abstract NativeSignatureDBManager getNativeSignatureDBManager ()

Retrieve the native signature DB manager managed by this context.

public abstract INet getNetworkUtility ()

Retrieve a network utility object used by this engines context. The network object is configured to use the proxy specified by the owner Core context's properties.

public abstract IRuntimeProject getProject (String key)

Get a project by key.

Parameters
key mandatory project key
Returns
  • the project or null

public abstract IRuntimeProject getProject (int index)

Get a project by index.

Parameters
index 0-based index
Returns
  • the project or null

public abstract List<IRuntimeProject> getProjects ()

Retrieve a copy of the list of projects currently loaded within this context.

Returns
  • the list of projects managed by this context

public abstract IPropertyManager getPropertyManager ()

Get the property manager for this engines context.

Returns
  • the property manager

public abstract TypeLibraryService getTypeLibraryService ()

Retrieve the type library service managed by this context.

public abstract List<IUnitIdentifier> getUnitIdentifiers ()

Retrieve the list of all identifiers that projects managed by this context may have access to.

Returns
  • a list of unit identifiers (aka, parsers)

public abstract boolean isIdentifierEnabled (IUnitIdentifier identifier)

Determine if an identifier is enabled.

Parameters
identifier the identifier
Returns
  • true if enabled, false otherwise

public abstract IRuntimeProject loadProject (String key)

Load an existing project or create a new project.

Parameters
key an existing or new project key
Returns
  • a project reference
Throws
IOException on IO error
SerializationException on serialization error

public abstract IRuntimeProject loadProject (String key, IProgressCallback callback)

Load an existing project or create a new project.

Parameters
key an existing or new project key
callback an optional callback object fed with regular information regarding the current loading status
Returns
  • a project reference
Throws
IOException on IO error
SerializationException on serialization error

public abstract boolean saveProject (String projectKey, String persistenceKey, Map<String, Object> optionalParameters)

Save the state of a project (including artifacts and all units) to the project database. If the project DB is backed up by a filesystem, the project will be persisted to a ".jdb2" file.

Parameters
projectKey the project key
persistenceKey optional persistence key; set it to override the current key and persist to a different location
optionalParameters opaque dictionary of optional parameters (reversed for internal use)
Returns
  • the project key
Throws
IOException on IO error
SerializationException on deserialization error

public abstract boolean saveProject (String key)

Save the state of a project (including artifacts and all units) to the project database. If the project DB is backed up by a filesystem, the project will be persisted to a ".jdb2" file.

Parameters
key the project key
Returns
  • success indicator
Throws
IOException on IO error
SerializationException on deserialization error

public abstract boolean setIdentifierEnabled (IUnitIdentifier identifier, boolean enabled)

Enable or disable an identifier.

Parameters
identifier the identifier
enabled true to enable the identifier, false otherwise; in the latter case, will never get called
Returns
  • success indicator

public abstract boolean unloadProject (String key)

Unload a project.

Parameters
key the project key
Returns
  • success indicator