Package com.pnfsoftware.jeb.client
Class HeadlessClientContext
java.lang.Object
com.pnfsoftware.jeb.util.events.EventSource
com.pnfsoftware.jeb.client.AbstractContext
com.pnfsoftware.jeb.client.AbstractClientContext
com.pnfsoftware.jeb.client.HeadlessClientContext
- All Implemented Interfaces:
IClientContext,IEventSource
Headless client context for the command-line client. This context is used:
- for license key generation in headless environments
- for command-line based software update
- as the base of the built-in script runner (v2)
- for license key generation in headless environments
- for command-line based software update
- as the base of the built-in script runner (v2)
-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.client.AbstractClientContext
args, basicChecksPassed, CLIENT_RUNNING_FILENAME_PREFIX, coreOptions, defaultClientConfigPath, defaultEnginesConfigPath, defaultPluginsFolderName, defaultScriptsFolderName, defaultTelemetryDatabasePath, inputpath, INSTALLER_LOCK_FILENAME, scriptpath, ugerrstrFields inherited from class com.pnfsoftware.jeb.client.AbstractContext
app_company, app_dates, app_domain, app_email_licensing, app_email_support, app_email_updates, app_licensing_backup, app_name, app_uri, app_url_apidoc, app_url_changelog, app_url_chat, app_url_check_update, app_url_check_update_backup, app_url_devportal, app_url_donate, app_url_faq, app_url_faqmem, app_url_fileuploader, app_url_forum, app_url_genkey, app_url_genkey_backup, app_url_genlk, app_url_github, app_url_github_samples, app_url_github_samples_scripts, app_url_manual, app_url_motd, app_url_purchase, app_url_uploaderrorlog, app_ver, app_website, demo, integrity_failed, just_updatedFields inherited from class com.pnfsoftware.jeb.util.events.EventSource
onEventCallCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanNot called locally: it is entirely up to the client to implement and decide who calls this method.voiddisplayDemoInformation(String demoInfo) Display information about demo restrictions.booleandisplayEula(String eula) Display the end-user license agreement.voidinitialize(String[] argv) Initialize the client context from command-line arguments and configuration files.voidnotifyFloatingClient(ControllerNotification notification) Notify the client of a floating-controller event.voidNotify the client that support or subscription benefits expired.voidonUpdatedSoftware(String changelist, Version oldVersion) Notify a concrete client that a new version of JEB is being run for the first time.retrieveLicenseKey(String licdata) Retrieve a license key from the user.booleanAsk the client to configure floating-controller settings if needed.voidstart()The headless implementation also initializes the JEB engines.voidstop()Stop the client context and release telemetry and core resources.Methods inherited from class com.pnfsoftware.jeb.client.AbstractClientContext
assignCommandlineArguments, checkRunningInstaller, closeMainProject, closeOpenedProject, dumpProgramError, dumpUpdateToDisk, formatMemoryUsage, formatProcessInfo, generateLicenseInformation, getArguments, getConfiguration, getControllerInterface, getControllerMessage, getControllerPort, getControllerProtocol, getCoreContext, getEnginesContext, getInputpath, getLastPublicAnnouncementId, getLatestAvailableUpdate, getLogLevel, getMainProject, getMaxMemory, getNetworkUtility, getOpenedProject, getPreferredLanguage, getProcessId, getPropertyDefinitionManager, getPropertyManager, getProxyString, getScriptpath, getScriptsDirectory, getScriptsDirfile, getTelemetry, getTransientStore, getUpdateChannel, getUsedMemory, getUuid, hasOpenedProject, initializeEngines, isDevelopmentMode, isHeadless, logMemoryUsage, open, ping, retrieveLatestPublicAnnouncement, setControllerInterface, setControllerPort, setControllerProtocol, setDevelopmentMode, setLastPublicAnnouncementId, setLatestAvailableUpdate, setLogLevel, setPreferredLanguage, setProxyString, setScriptsDirectory, setUpdateChannel, shouldCheckPublicAnnouncements, shouldCheckUpdatesMethods inherited from class com.pnfsoftware.jeb.client.AbstractContext
getAppDirectory, getBaseDirectory, getChannelName, getCurrentDirectory, getJebClassesLocation, getProgramDirectory, getSoftwareVersion, getStartTimestamp, handleUncaughtException, initNetworkUtility, isPreRelease, terminateMethods inherited from class com.pnfsoftware.jeb.util.events.EventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, notifyListeners, notifyListeners, relay, removeListener, setParentSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pnfsoftware.jeb.client.api.IClientContext
closeMainProject, getArguments, getBaseDirectory, getEnginesContext, getMainProject, getMaxMemory, getProcessId, getProgramDirectory, getSoftwareVersion, getTransientStore, getUsedMemory, open
-
Constructor Details
-
HeadlessClientContext
public HeadlessClientContext()Create a headless client context.
-
-
Method Details
-
initialize
Description copied from class:AbstractClientContextInitialize the client context from command-line arguments and configuration files.- Overrides:
initializein classAbstractClientContext- Parameters:
argv- command-line arguments
-
start
The headless implementation also initializes the JEB engines.- Overrides:
startin classAbstractClientContext- Throws:
JebException- on initialization or licensing error
-
stop
public void stop()Description copied from class:AbstractClientContextStop the client context and release telemetry and core resources.- Overrides:
stopin classAbstractClientContext
-
displayEula
Description copied from class:AbstractClientContextDisplay the end-user license agreement.Called from
AbstractClientContext.start().- Specified by:
displayEulain classAbstractClientContext- Parameters:
eula- EULA text- Returns:
- true if the user accepted the EULA
-
retrieveLicenseKey
Description copied from class:AbstractClientContextRetrieve a license key from the user.Called from
AbstractClientContext.start().- Specified by:
retrieveLicenseKeyin classAbstractClientContext- Parameters:
licdata- license data blob- Returns:
- the license key entered by the user
-
checkUpdate
public boolean checkUpdate()Description copied from class:AbstractClientContextNot called locally: it is entirely up to the client to implement and decide who calls this method.- Specified by:
checkUpdatein classAbstractClientContext- Returns:
- true if an update was downloaded and should be applied
-
onUpdatedSoftware
Description copied from class:AbstractClientContextNotify a concrete client that a new version of JEB is being run for the first time.Called from
AbstractClientContext.start().- Specified by:
onUpdatedSoftwarein classAbstractClientContext- Parameters:
changelist- an optional change logoldVersion- the last version of JEB that was run (note: the current version is always available as astatic public field)
-
notifySupportExpired
public void notifySupportExpired()Description copied from class:AbstractClientContextNotify the client that support or subscription benefits expired.Called from
AbstractClientContext.start().- Specified by:
notifySupportExpiredin classAbstractClientContext
-
displayDemoInformation
Description copied from class:AbstractClientContextDisplay information about demo restrictions.Called from
AbstractClientContext.start().- Specified by:
displayDemoInformationin classAbstractClientContext- Parameters:
demoInfo- demo information text
-
setupController
public boolean setupController()Description copied from class:AbstractClientContextAsk the client to configure floating-controller settings if needed.Called from
AbstractClientContext.start().- Specified by:
setupControllerin classAbstractClientContext- Returns:
- true if the controller was configured successfully
-
notifyFloatingClient
Description copied from class:AbstractClientContextNotify the client of a floating-controller event.May be called from any thread.
- Specified by:
notifyFloatingClientin classAbstractClientContext- Parameters:
notification- controller notification
-