Show / Hide Table of Contents
  • BC HTML Api reference
    • html-api
      • AnnotationArrowOrientation
      • AnnotationTextAlignment
      • AnnotationTextFontFamily
      • BarcodeOrientation
      • BarcodeThresholdMode
      • BarcodeType
      • BatchEnums
        • Mode
        • Queue
      • CallContext
      • DbClient
      • DbServer
      • FileMimeType
      • FileType
      • IAnnotation
      • IAnnotationProperties
      • IApplication
      • IBarcodeData
      • IBaseControl
      • IBatch
      • IBatchClass
      • IButton
      • ICheckBox
      • IComboBox
      • ICustomThemeConfig
      • IDocument
      • IDocumentClass
      • IField
      • IFieldValidation
      • IFileInfo
      • IFolder
      • IFolderClass
      • IFormType
      • IGroup
      • IIndexClass
      • IITModule
      • IJob
      • ILabel
      • ILicenseGroup
      • IListItem
      • IListView
      • ImageColorMode
      • ImageOperationType
      • INode
      • INodeComment
      • INodeReviewComment
      • INuanceEngineConfig
      • IOCRConfiguration
      • IPage
        • Side
      • IRadioButton
      • IRecognitionProfile
      • IRectangle
      • IRegexValidation
      • IScanProfile
      • ITable
      • ITabView
      • ITextBox
      • IthConfig
      • ITitledPanel
      • IUser
      • LevelName
      • NodeReviewStatus
      • NuanceEngine
      • NuanceLanguage
      • NuanceMode
      • PageSideMode
      • RecognitionEngine
      • RpcService
      • ScanService
      • ScanSource
      • ScriptActionType
      • ScriptResultConsts
      • ScriptResultProp
      • UnloadReason

Interface RpcService

Provides access to RPC operations executed on the core or HTML services.

Methods list

executeRpc(rpcClass, rpcOperation, args) executeRpcSync(rpcClass, rpcOperation, args) invokeOnServer(opName, params, pages) invokeOnServerWithBatch(opName, params)

Methods

executeRpc(rpcClass, rpcOperation, args)

Executes an asynchronous RPC operation on the server. This method instructs the ImageTrust server to load the specified implementing class and execute the specified operation, passing the provided arguments. This is an asynchronous operation, meaning the calling thread is not blocked until the operation completes. The operation returns a Promise and the actual result is delivered as the Promises resolution value when it arrives.

Arguments will be collected in an array and marshalled as a JSON array for transmission to the server so, ideally, they should be of types readily supported by JSON. For more complex types the client can serialize them as he wishes and pass strings to this method.

Similarily, the return value should be a string. The server RpcExecutor should stringify more complex types somehow (e.g. JSON) and the caller is responsible for deserializing.

context
Not available.
Declaration
executeRpc(rpcClass: string, rpcOperation: string, ...args: any): Promise<string>;
Parameters
Type Name Description
string rpcClass
string rpcOperation
any args
Returns
Type Description
Promise<string>

executeRpcSync(rpcClass, rpcOperation, args)

Executes a synchronous RPC operation on the server. This method instructs the ImageTrust server to load the specified implementing class and execute the specified operation, passing the provided arguments. This is a synchronous operation, meaning the calling thread is blocked until the operation completes and the result is transmitted back to the ImageTrust client.

Arguments MUST be , so that their state can be serialized and transmitted to the server. If any of the arguments are of classes that are not provided by Java or ImageTrust, the classes MUST be present on the server, accompanying the implementation.

Any uploaded temporary files MUST be referred to by the unique IDs generated by the methods.

context
Not available.
Declaration
executeRpcSync(rpcClass: string, rpcOperation: string, ...args: any): any;
Parameters
Type Name Description
string rpcClass
string rpcOperation
any args
Returns
Type Description
any

invokeOnServer(opName, params, pages)

Executes a method (operation) of a registered RPCExecutor on the server.

Declaration
invokeOnServer(opName: string, params?: string, pages?: TCPage | TCPage[]): Promise<any>;
Parameters
Type Name Description
string opName

the name of the operation

string params

the parameters that will be passed to the operation. Normally a JSON-stringified object that may be parsed on the server and presented to the RPCExecutor as a Java object

TCPage | TCPage[] pages

a or a list of objects to be passed on to the operation. On the server, you are able to get a list of the images that are associated with these page objects.

Returns
Type Description
Promise<any>

any return value returned from the server will be returned as the resolution value of the promise

invokeOnServerWithBatch(opName, params)

Executes a method (operation) of a registered RPCExecutor on the server.

Declaration
invokeOnServerWithBatch(opName: string, params?: string): Promise<any>;
Parameters
Type Name Description
string opName

the name of the operation

string params

the parameters that will be passed to the operation. Normally a JSON-stringified object that may be parsed on the server and presented to the RPCExecutor as a Java object.

Returns
Type Description
Promise<any>

any return value returned from the server will be returned as the resolution value of the promise

Back to top Generated by DocFX