java.lang.Object | |||
↳ | com.pnfsoftware.jeb.util.events.EventSource | ||
↳ | com.pnfsoftware.jeb.client.AbstractContext | ||
↳ | com.pnfsoftware.jeb.client.AbstractClientContext |
Known Direct Subclasses |
Base context for official JEB clients. It is used by the RCP client context (GUI), the Controller (floating) context, as well as the headless runner.
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 | CLIENT_RUNNING_FILENAME_PREFIX | ||||||||||
String | INSTALLER_LOCK_FILENAME | ||||||||||
String | defaultClientConfigPath | ||||||||||
String | defaultEnginesConfigPath | ||||||||||
String | defaultPluginsFolderName | ||||||||||
String | defaultScriptsFolderName | ||||||||||
String | defaultTelemetryDatabasePath |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pnfsoftware.jeb.client.AbstractContext
|
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 | ||||||||||
protected String | scriptpath | ||||||||||
protected String | ugerrstr |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pnfsoftware.jeb.client.AbstractContext
| |||||||||||
From class
com.pnfsoftware.jeb.util.events.EventSource
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractClientContext() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | checkRunningInstaller() | ||||||||||
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() | ||||||||||
static String |
formatProcessInfo(boolean inclPid, boolean inclMeminfo, boolean inclTimes, boolean inclCmdline)
Format various process information bits.
| ||||||||||
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() | ||||||||||
final Version | getLatestAvailableUpdate() | ||||||||||
int | getLogLevel() | ||||||||||
IRuntimeProject |
getMainProject()
Same as
getOpenedProject() . | ||||||||||
long |
getMaxMemory()
Get the theoretical maximum amount of memory that JEB can allocate and use.
| ||||||||||
Net | getNetworkUtility() | ||||||||||
final IRuntimeProject |
getOpenedProject()
Retrieve the current project, if any.
| ||||||||||
final String | getPreferredLanguage() | ||||||||||
long |
getProcessId()
Retrieve the process id of the Java VM executing JEB.
| ||||||||||
IPropertyDefinitionManager | getPropertyDefinitionManager() | ||||||||||
IPropertyManager | getPropertyManager() | ||||||||||
final String | getProxyString() | ||||||||||
String | getScriptpath() | ||||||||||
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.
| ||||||||||
final int | getUpdateChannel() | ||||||||||
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(int downloadOrder, int clientChannel, SoftwareBuildInfo sbi, IProgressCallback progressCallback, boolean verbose)
Ping the JEB update server, and optionally download a JEB update on a compatible update
channel.
| ||||||||||
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 | setLatestAvailableUpdate(Version version) | ||||||||||
void | setLogLevel(int level) | ||||||||||
final void | setPreferredLanguage(String language) | ||||||||||
final void | setProxyString(String strProxyinfo) | ||||||||||
final void | setScriptsDirectory(String folder) | ||||||||||
final void | setUpdateChannel(int channel) | ||||||||||
abstract boolean |
setupController()
Called from
start() . | ||||||||||
final boolean | shouldCheckPublicAnnouncements() | ||||||||||
final boolean | shouldCheckUpdates() | ||||||||||
void |
start()
Install update, if any.
| ||||||||||
void | stop() |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
assignCommandlineArguments(String[] argv)
Initialize the |configpath| and |inputpath|attributes.
| ||||||||||
final void |
initializeEngines()
Initialize the core context and an engines context.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pnfsoftware.jeb.client.AbstractContext
| |||||||||||
From class
com.pnfsoftware.jeb.util.events.EventSource
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.client.api.IClientContext
| |||||||||||
From interface
com.pnfsoftware.jeb.util.events.IEventSource
|
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 |
---|
Format various process information bits. Each bit is formatted on a single line.
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.
Same as getOpenedProject()
.
Get the theoretical maximum amount of memory that JEB can allocate and use.
Retrieve the current project, if any. Same as getMainProject()
.
Retrieve the process id of the Java VM executing JEB.
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 optionally download a JEB update on a compatible update channel.
downloadOrder | orders:
|
---|---|
clientChannel | current client channel, ie maximum allowed channel a build must confirm
to; see Version for a list of available channels |
sbi | optional information about the update |
progressCallback | optional callback, used if the update package is to be downloaded |
verbose | if true, messages are logged; if false, only important messages are logged |
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 |configpath| and |inputpath|attributes.
Initialize the core context and an engines context.
JebException |
---|