Class JebCoreService

java.lang.Object
com.pnfsoftware.jeb.core.JebCoreService

public class JebCoreService extends Object
Service class used to create or retrieve a reference to the JEB core context. The core context provides verified access to the engines.

Typically, it is the responsibility of client implementations (eg, the official RCP client), not plugins, to instantiate the core and a single engines context.

  • Constructor Details

    • JebCoreService

      public JebCoreService()
  • Method Details

    • getExistingInstance

      public static ICoreContext getExistingInstance()
      Retrieve an existing core context (= JEB back-end) if one exists. If none exist, null is returned.
      Returns:
      the core context or null
    • getInstance

      public static ICoreContext getInstance() throws JebException
      Retrieve an instance of the previously instantiated core.
      Returns:
      the core context
      Throws:
      JebException - on error
    • getInstance

      public static ICoreContext getInstance(String licenseKey) throws JebException
      Retrieve or create an instance of a core.
      Parameters:
      licenseKey - a valid JEB license key
      Returns:
      the context
      Throws:
      JebException - on error
    • getInstance

      public static ICoreContext getInstance(String licenseKey, CoreOptions options) throws JebException
      Retrieve or create an instance of a core.
      Parameters:
      licenseKey - a valid JEB license key
      options - core options
      Returns:
      the context
      Throws:
      JebException - on error
    • getDefaultEnginesContext

      public static IEnginesContext getDefaultEnginesContext()
      Convenience method used to retrieve the primary (default) engines context managed by an initialized JEB core back-end.
      Returns:
    • notifyExceptionToClient

      public static void notifyExceptionToClient(Throwable throwable, int flags, Map<String,Object> extradata, IUnit unit)
      Convenience method to "forward" (via an event) a throwable to the client for processing. The client may decide to ignore, display, or further process (eg, report or log) the exception.
      Parameters:
      throwable - an error or exception
      flags - internal flags
      extradata - optional
      unit - optional unit object from which the exception originated
    • notifyExceptionToClient

      public static void notifyExceptionToClient(Throwable throwable)
      Parameters:
      throwable - an error or exception
    • notifySilentExceptionToClient

      public static void notifySilentExceptionToClient(Throwable throwable)
      Parameters:
      throwable - an error or exception
    • notifySilentExceptionToClient

      public static void notifySilentExceptionToClient(Throwable throwable, IUnit unit)
      Parameters:
      throwable - an error or exception
      unit - optional unit object from which the exception originated
    • notifySilentExceptionToClient

      public static void notifySilentExceptionToClient(Throwable throwable, Map<String,Object> extradata)
      Parameters:
      throwable - an error or exception
      extradata - optional
    • silentExcept

      public static void silentExcept(Throwable throwable)
      Internal method reserved for debug builds.
      Parameters:
      throwable -
    • notifyTelemetryToClient

      public static void notifyTelemetryToClient(String eventName, Map<String,String> properties)
    • notifyTelemetryToClient

      public static void notifyTelemetryToClient(String eventName)
    • notifyTelemetryToClient

      public static void notifyTelemetryToClient(String eventName, String key0, String value0)
    • notifyTelemetryToClient

      public static void notifyTelemetryToClient(String eventName, String key0, String value0, String key1, String value1)