java.lang.Object | |||
↳ | com.pnfsoftware.jeb.util.events.EventSource | ||
↳ | com.pnfsoftware.jeb.client.AbstractContext | ||
↳ | com.pnfsoftware.jeb.client.AbstractClientContext |
![]() |
The base context for official JEB clients. Currently used by the RCP client context and the Controller (floating) context.
On top of the abstract methods, which must be implemented, client code that override the
following method must call the super-class method:
- initialize(String[])
- start()
- stop()
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | defaultClientConfigPath | ||||||||||
String | defaultEnginesConfigPath | ||||||||||
String | defaultPluginsFolderName | ||||||||||
String | defaultScriptsFolderName | ||||||||||
String | defaultTelemetryDatabasePath |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected String[] | args | ||||||||||
protected boolean | basicChecksPassed | ||||||||||
protected CoreOptions | coreOptions | A reference to core options that will be used when the JEB core context is instantiated in
start() . |
|||||||||
protected String | inputpath |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractClientContext() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
checkUpdate()
Not called locally: it is entirely up to the client to implement and decide who calls this
method.
| ||||||||||
boolean |
closeMainProject()
Convenience method used to close the main project (if any), that is, the first project of the
first engines context managed by the JEB back-end.
| ||||||||||
final boolean | closeOpenedProject() | ||||||||||
abstract void |
displayDemoInformation(String demoInfo)
Called from
start() . | ||||||||||
abstract boolean |
displayEula(String eula)
Called from
start() . | ||||||||||
final void | dumpUpdateToDisk(byte[] data, String password) | ||||||||||
static String | formatMemoryUsage() | ||||||||||
final static String | generateLicenseInformation() | ||||||||||
String[] |
getArguments()
Get the input arguments provided to this client context.
| ||||||||||
Configuration | getConfiguration() | ||||||||||
String | getControllerInterface() | ||||||||||
String | getControllerMessage() | ||||||||||
int | getControllerPort() | ||||||||||
int | getControllerProtocol() | ||||||||||
final ICoreContext |
getCoreContext()
Get the JEB core instance.
| ||||||||||
final IEnginesContext |
getEnginesContext()
Get the JEB engines instance.
| ||||||||||
String | getInputpath() | ||||||||||
final int | getLastPublicAnnouncementId() | ||||||||||
IRuntimeProject |
getMainProject()
Convenience method used to retrieve the main project (if any), that is, the first project of
the first engines context managed by the JEB back-end.
| ||||||||||
long |
getMaxMemory()
Get the theoretical maximum amount of memory that JEB can allocate and use.
| ||||||||||
Net | getNetworkUtility() | ||||||||||
final IRuntimeProject | getOpenedProject() | ||||||||||
final String | getPreferredLanguage() | ||||||||||
IPropertyDefinitionManager | getPropertyDefinitionManager() | ||||||||||
IPropertyManager | getPropertyManager() | ||||||||||
final String | getProxyString() | ||||||||||
final String |
getScriptsDirectory()
Retrieve the JEB scripts directory path.
| ||||||||||
final File |
getScriptsDirfile()
Retrieve and if necessary create the JEB scripts directory.
| ||||||||||
ITelemetryDatabase | getTelemetry() | ||||||||||
Map<Object, Object> |
getTransientStore()
Retrieve a reference to the transient store provided by this context.
| ||||||||||
long |
getUsedMemory()
Get the amount of memory currently used by JEB.
| ||||||||||
final long | getUuid() | ||||||||||
final boolean | hasOpenedProject() | ||||||||||
void | initialize(String[] argv) | ||||||||||
boolean | isDevelopmentMode() | ||||||||||
boolean | isHeadless() | ||||||||||
final void | logMemoryUsage() | ||||||||||
abstract void |
notifyFloatingClient(ControllerNotification notification)
May be called from anywhere, any thread.
| ||||||||||
abstract void |
notifySupportExpired()
Called from
start() . | ||||||||||
abstract void |
onUpdatedSoftware(String changelist, Version oldVersion)
Notify a concrete client that a new version of JEB is being run for the first time.
| ||||||||||
IUnit |
open(String path)
Convenience method used to create a JEB project (or retrieve the current project if one is
opened), load a file artifact into the project, process it, and return the resulting
top-level unit.
| ||||||||||
final int |
ping(boolean downloadUpdatePackage, int maxChannel, SoftwareBuildInfo sbi, IProgressCallback progressCallback)
Ping the JEB update server, and drop update to JEB folder if possible.
| ||||||||||
final PublicAnnouncement | retrieveLatestPublicAnnouncement() | ||||||||||
abstract String |
retrieveLicenseKey(String licdata)
Called from
start() . | ||||||||||
void | setControllerInterface(String iface) | ||||||||||
void | setControllerPort(int port) | ||||||||||
void | setControllerProtocol(int protocol) | ||||||||||
void | setDevelopmentMode(boolean enabled) | ||||||||||
final void | setLastPublicAnnouncementId(int id) | ||||||||||
final void | setPreferredLanguage(String language) | ||||||||||
final void | setProxyString(String strProxyinfo) | ||||||||||
final void | setScriptsDirectory(String folder) | ||||||||||
abstract boolean |
setupController()
Called from
start() . | ||||||||||
final boolean | shouldCheckPublicAnnouncements() | ||||||||||
final boolean | shouldCheckUpdates() | ||||||||||
void |
start()
Install update, if any.
| ||||||||||
void | stop() |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final void |
initializeEngines()
Initialize the core context and an engines context.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Not called locally: it is entirely up to the client to implement and decide who calls this method.
Convenience method used to close the main project (if any), that is, the first project of the first engines context managed by the JEB back-end. If no project is opened, this method will return false.
IOException |
---|
Get the input arguments provided to this client context. The returned array depends on how the context was instantiated and called.
Get the JEB core instance. Should never be null unless an error happened in start()
or the context is one of a floating controller.
Get the JEB engines instance. Should never be null unless an error happened in
start()
or the context is one of a floating controller.
Convenience method used to retrieve the main project (if any), that is, the first project of the first engines context managed by the JEB back-end. If no project is opened, this method will return null.
Get the theoretical maximum amount of memory that JEB can allocate and use.
Retrieve the JEB scripts directory path.
Retrieve and if necessary create the JEB scripts directory.
Retrieve a reference to the transient store provided by this context. Clients may use this map to store context-level global objects. The store and its objects are not persisted with a project JDB2 database.
Interface specifications for implementations:
- Null keys are forbidden, null values are allowed
- Insertion, retrieval and deletion are thread-safe
- Iterating is not thread-safe
- The insertion order is not guaranteed during iteration
Get the amount of memory currently used by JEB.
May be called from anywhere, any thread.
Notify a concrete client that a new version of JEB is being run for the first time.
Called from start()
.
changelist | an optional change log |
---|---|
oldVersion | the last version of JEB that was run (note: the current version is always
available as a static public field )
|
Convenience method used to create a JEB project (or retrieve the current project if one is opened), load a file artifact into the project, process it, and return the resulting top-level unit.
If the input file is a JDB2 saved project, that project is opened and returned. The method will throw IllegalStateException if a project is already opened.
path | input file to be analyzed, or an existing project saved as a JDB2 database (*.jdb2) |
---|
IOException |
---|
Ping the JEB update server, and drop update to JEB folder if possible.
downloadUpdatePackage | if false, will just ping the server, no download will be initiated if there is an update available |
---|---|
maxChannel | maximum requested channel (0=RC, 1=RC|beta, 2=RC|beta|alpha) |
sbi | optional information about the update |
progressCallback | optional callback, used if the update package is to be downloaded |
Install update, if any. Allow the display of client-specific material such as: EULA, changelog, etc. If loating, initialize the floating client. Performs a license check for release builds. If not a controller, initialize a JEB #corectx core and #engctx engines.
JebException |
---|
Initialize the core context and an engines context.
JebException |
---|