public interface

IScript

com.pnfsoftware.jeb.client.api.IScript

Class Overview

Interface for client's scripts. Similar to JEB1's IScript.

Example: file SampleScript.py

 from com.pnfsoftware.jeb.client.api import IScript
 
 class SampleScript(IScript):
   def run(self, ctx):
     print('Hello, JEB')
 

Scripts should be designed to achieve relatively short and to-the-point operations, within a client context. Scripts have access to parts of the the client context, exposed via IClientContext and sub-interfaces.

Note: Unlike plugins, scripts should be started on the client's main thread. In the case of the official RCP desktop client, they are executed on the main UI thread. Care should be taken to not block the main thread for extended periods of time. Long operations should take place on separately spawned worker threads.

Summary

Public Methods
abstract void run(IClientContext context)
Execute the script entry-point method.

Public Methods

public abstract void run (IClientContext context)

Execute the script entry-point method.

Parameters
context a client context, currently either IClientContext or IGraphicalClientContext for UI clients