Class OnlineProcessingConfig.Builder
- java.lang.Object
-
- com.regula.documentreader.api.params.OnlineProcessingConfig.Builder
-
- Enclosing class:
- OnlineProcessingConfig
public static final class OnlineProcessingConfig.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OnlineProcessingConfig
build()
OnlineProcessingConfig.Builder
setImageCompressionQuality(float imageCompressionQuality)
Image quality setting affects query execution time.OnlineProcessingConfig.Builder
setImageFormat(int imageFormat)
Set images format.OnlineProcessingConfig.Builder
setMode(int mode)
Set online processing modeOnlineProcessingConfig.Builder
setNetworkInterceptorListener(NetworkInterceptorListener networkInterceptorListener)
Set listener to intercept request to the serviceOnlineProcessingConfig.Builder
setProcessParams(ProcessParam processParam)
set up processing paramsOnlineProcessingConfig.Builder
setUrl(java.lang.String url)
Set service url
-
-
-
Constructor Detail
-
Builder
public Builder(int mode)
New OnlineProcessingConfiguration.Builder instance- Parameters:
mode
-OnlineMode.OnlineModeValues
-
Builder
public Builder(int mode, java.lang.String scenario)
New OnlineProcessingConfiguration.Builder instance- Parameters:
mode
-OnlineMode.OnlineModeValues
scenario
-Scenario.Scenarios
-
-
Method Detail
-
setUrl
public OnlineProcessingConfig.Builder setUrl(java.lang.String url)
Set service url- Parameters:
url
-OnlineMode.OnlineModeValues
-
setMode
public OnlineProcessingConfig.Builder setMode(int mode)
Set online processing mode- Parameters:
mode
-OnlineMode.OnlineModeValues
-
setImageFormat
public OnlineProcessingConfig.Builder setImageFormat(int imageFormat)
Set images format. DefaultImageFormat.JPG
- Parameters:
imageFormat
-ImageFormat.ImageFormatValues
-
setImageCompressionQuality
public OnlineProcessingConfig.Builder setImageCompressionQuality(float imageCompressionQuality)
Image quality setting affects query execution time. Default value is 0.8- Parameters:
imageCompressionQuality
- range from 0 to 1. 0 meaning compress for small size, 1 meaning compress for max quality.ImageFormat.PNG
format, will ignore the quality setting
-
setNetworkInterceptorListener
public OnlineProcessingConfig.Builder setNetworkInterceptorListener(NetworkInterceptorListener networkInterceptorListener)
Set listener to intercept request to the service- Parameters:
networkInterceptorListener
- instance of the NetworkInterceptorListener interface
-
setProcessParams
public OnlineProcessingConfig.Builder setProcessParams(ProcessParam processParam)
set up processing params- Parameters:
processParam
- session configurations
-
build
public OnlineProcessingConfig build()
- Returns:
- a new OnlineProcessingConfiguration
-
-