Interface ServerConfiguration
- All Known Implementing Classes:
DefaultServerConfiguration,SpringPropertiesServerConfiguration
public interface ServerConfiguration
Holds the set of JWT server properties.
The intention of this interface is to hide the actual implementation of the configuration from
the user and provide a pluggable interface. Public access to the properties stored in here is
provided in a static manner by ConfigurationManager.getServerConfiguration().
This enables the JWT to provide different implementations for different configuration frameworks
in the future. Implementations of this interface can then be passed to
ConfigurationManager.setServerConfiguration(ServerConfiguration).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceHolds the initial configuration parameters the network layer will use.static enumEnum to define the supported PNG compressions for tile rendering -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the timeout for document read subtasks.intReturns the maximum amount flow requests that can be in the queue of the executorintintintReturns the core pool size for general tasks which is the minimum number of workers to keep alive (and not allow to time out etc).intReturns the maximum pool size for general tasks.intSet the maximum size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskServiceintGet the size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskServicecom.levigo.jadice.format.pdf.settings.PDFStructureReaderSettings.PDFStructureReadStrategyReturns the configured Read-Strategy for PDF files.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.intintReturns the expiry time of tiles in the clients browser-cache in seconds.Returns theServerConfiguration.TileCompressionTypeused by theTileServletto write the PNG tilesintReturns the amount of how many rendering-threads a single client can utilizeintReturns the maximum amount Tile-requests that can be in the queue of pending requestsintReturns the maximum amount Tile-requests that can be in the queue of the executorintReturns the core pool size for tile rendering which is the minimum number of workers to keep alive (and not allow to time out etc).intReturns the maximum pool size for tile rendering.booleanReturns true if the Servlet-Filter that sets caching-headers to static resources is enabled or not (default: true)booleanReturns true if the Servlet-Filter that sets caching-headers to static resources is enabled or not (default: true)booleanReturns true if the Servlet-Filter that sets caching-headers to Tiles is enabled or not (default: true)booleanReturns whether server side tile caching is enabled or not.booleanbooleanReturns true, when the Tile-Security-Filter is enabled.booleanvoidsetCacheFilterEnabled(boolean cacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to static resourcesvoidsetClientConfiguration(ClientConfiguration clientConfiguration) replace the default configurationvoidClear the existing list and add all filters passed invoidsetDocumentReadSubTaskTimeout(long documentReadSubTaskTimeout) Sets the timeout for document read subtasks.voidsetFlowWorkerMaxQueueSizeActive(int flowWorkerMaxQueueSizeActive) Sets the maximum amount of flow requests that can be in the queue of the executorvoidsetFlowWorkerPoolCoreSize(int flowWorkerPoolCoreSize) Sets the core pool size for jadice flow workers which is the minimum number of workers to keep alive (and not allow to time out etc).voidsetFlowWorkerPoolMaxSize(int flowWorkerPoolMaxSize) Sets the maximum pool size for flow workers.voidsetGeneralPoolCoreSize(int generalPoolCoreSize) Sets the core pool size for general tasks which is the minimum number of workers to keep alive (and not allow to time out etc).voidsetGeneralPoolMaxSize(int generalPoolMaxSize) Sets the maximum pool size for general tasks.voidsetJadiceCoreMaxPoolSize(int jadiceCoreMaxPoolSize) Set the maximum size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskServicevoidsetJadiceCorePoolSize(int jadiceCorePoolSize) Set the size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskServicevoidsetMetricNames(MetricNamesConfiguration metricNames) voidsetNoCacheFilterEnabled(boolean noCacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to static resourcesvoidsetPageSegmentHandleMetricsFilters(List<PageSegmentHandleMetricsFilter> pageSegmentHandleMetricsFilters) Clear the existing list and add all filters passed invoidsetPdfStructureReadStrategy(com.levigo.jadice.format.pdf.settings.PDFStructureReaderSettings.PDFStructureReadStrategy pdfStructureReadStrategy) Sets the Read-Strategy for PDF files.voidClear the existing list and add all filters passed invoidsetSaveAnnotationHandlers(HashMap<String, SaveAnnotationsHandler> saveAnnotationsHandlers) Deprecated, for removal: This API element is subject to removal in a future version.voidsetTextContentBunchSize(int bunchSize) If using thecom.levigo.jadice.web.client.config.ClientConfiguration'ssetIsTextContentStreamingmethod, you can set here how manyLineobjects you want to bundle before sending the bundle within one single message over the JWT connection frameworkvoidsetTileCacheFilterEnabled(boolean tileCacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to TilesvoidsetTileCachingEnabled(boolean tileCachingEnabled) This enables the server side caching of tiles, so that they do not need to be rendered every time.voidsetTileCachingHeaderExpiryTime(int tileCachingHeaderExpiryTime) Sets the expiry time of tiles in the clients browser-cache in seconds.voidsetTileCancellationEnabled(boolean tileCancellationEnabled) voidsetTileCompressionType(ServerConfiguration.TileCompressionType tileCompressionType) Sets theServerConfiguration.TileCompressionTypeused by theTileServletto write the PNG tilesvoidsetTileRendererMaxParallelRenderingPerClient(int tileRendererMaxParallelRenderingPerClient) Sets the number of how many rendering-threads a single client can utilize.voidsetTileRendererMaxPendingRequestsSize(int tileRendererMaxPendingRequestsSize) Sets the maximum amount Tile-requests that can be in the queue of the pending requestsvoidsetTileRendererMaxQueueSizeActive(int tileRendererMaxQueueSizeActive) Sets the maximum amount Tile-requests that can be in the queue of the executorvoidsetTileRendererPoolCoreSize(int tileRendererPoolCoreSize) Sets the core pool size for tile rendering which is the minimum number of workers to keep alive (and not allow to time out etc).voidsetTileRendererPoolMaxSize(int tileRendererPoolMaxSize) Sets the maximum pool size for tile rendering.voidsetTileSecurityFilterEnabled(boolean tileSecurityFilterEnabled) Enable or disable the Tile-Security-Filter.voidsetUseSessionSpecificDocumentKey(boolean useSessionSpecificDocumentKey) The PlainInvocationContext in the TileServlet uses the authentication-info of AuthenticationInfoManager if it is present.
-
Method Details
-
isTileCachingEnabled
boolean isTileCachingEnabled()Returns whether server side tile caching is enabled or not.- Returns:
trueif the server side tile caching is enabled,falseif not
-
setTileCachingEnabled
void setTileCachingEnabled(boolean tileCachingEnabled) This enables the server side caching of tiles, so that they do not need to be rendered every time. It is highly recommended to enable it.- Parameters:
tileCachingEnabled- True if tile caching should be enabled, false if not
-
getTileCompressionType
ServerConfiguration.TileCompressionType getTileCompressionType()Returns theServerConfiguration.TileCompressionTypeused by theTileServletto write the PNG tiles- Returns:
- the TileCompressionType
-
setTileCompressionType
Sets theServerConfiguration.TileCompressionTypeused by theTileServletto write the PNG tiles- Parameters:
tileCompressionType- the TileCompressionType
-
getNetworkConfiguration
ServerConfiguration.NetworkConfiguration getNetworkConfiguration()- Returns:
- the
ServerConfiguration.NetworkConfigurationused to initialize values of the network layer.
-
getClientConfiguration
ClientConfiguration getClientConfiguration()- Returns:
- the
ClientConfigurationused to expose configs for all clients by the server
-
setClientConfiguration
replace the default configuration- Parameters:
clientConfiguration- theClientConfigurationused to expose configs for all clients by the server
-
getMetricNames
MetricNamesConfiguration getMetricNames()- Returns:
- the
MetricNamesConfigurationused to individually rename metrics generated by the jadice web toolkit
-
setMetricNames
- Parameters:
metricNames- set theMetricNamesConfigurationused to individually rename metrics generated by the jadice web toolkit
-
getGeneralPoolCoreSize
int getGeneralPoolCoreSize()Returns the core pool size for general tasks which is the minimum number of workers to keep alive (and not allow to time out etc). -
setGeneralPoolCoreSize
void setGeneralPoolCoreSize(int generalPoolCoreSize) Sets the core pool size for general tasks which is the minimum number of workers to keep alive (and not allow to time out etc). Must not be less than 0- Parameters:
generalPoolCoreSize-
-
getGeneralPoolMaxSize
int getGeneralPoolMaxSize()Returns the maximum pool size for general tasks. -
setGeneralPoolMaxSize
void setGeneralPoolMaxSize(int generalPoolMaxSize) Sets the maximum pool size for general tasks. Must be greater than 0- Parameters:
generalPoolMaxSize-
-
setJadiceCorePoolSize
void setJadiceCorePoolSize(int jadiceCorePoolSize) Set the size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskService -
getJadiceCorePoolSize
int getJadiceCorePoolSize()Get the size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskService -
setJadiceCoreMaxPoolSize
void setJadiceCoreMaxPoolSize(int jadiceCoreMaxPoolSize) Set the maximum size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskService -
getJadiceCoreMaxPoolSize
int getJadiceCoreMaxPoolSize()Set the maximum size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskService -
getTileRendererPoolCoreSize
int getTileRendererPoolCoreSize()Returns the core pool size for tile rendering which is the minimum number of workers to keep alive (and not allow to time out etc). -
setTileRendererPoolCoreSize
void setTileRendererPoolCoreSize(int tileRendererPoolCoreSize) Sets the core pool size for tile rendering which is the minimum number of workers to keep alive (and not allow to time out etc). Must not be less than 0- Parameters:
tileRendererPoolCoreSize-
-
getTileRendererPoolMaxSize
int getTileRendererPoolMaxSize()Returns the maximum pool size for tile rendering. -
setTileRendererPoolMaxSize
void setTileRendererPoolMaxSize(int tileRendererPoolMaxSize) Sets the maximum pool size for tile rendering. Must be greater than 0- Parameters:
tileRendererPoolMaxSize-
-
getTileRendererMaxParallelRenderingPerClient
int getTileRendererMaxParallelRenderingPerClient()Returns the amount of how many rendering-threads a single client can utilize- Returns:
- tileRendererMaxParallelRenderingPerClient
-
setTileRendererMaxParallelRenderingPerClient
void setTileRendererMaxParallelRenderingPerClient(int tileRendererMaxParallelRenderingPerClient) Sets the number of how many rendering-threads a single client can utilize. By default, the value is determined bygetTileRendererPoolMaxSize(). If this value is set to more than 8, tileRendererMaxParallelRenderingPerClient will be the value minus 2, if it is less than 8, tileRendererMaxParallelRenderingPerClient will be the value minus 1. Set 0 if a client can utilize all rendering-threads.- Parameters:
tileRendererMaxParallelRenderingPerClient- the amount of how many rendering-threads a single client can utilize
-
getTileRendererMaxQueueSizeActive
int getTileRendererMaxQueueSizeActive()Returns the maximum amount Tile-requests that can be in the queue of the executor- Returns:
- the maximum amount Tile-requests that can be in the queue of the executor
-
setTileRendererMaxQueueSizeActive
void setTileRendererMaxQueueSizeActive(int tileRendererMaxQueueSizeActive) Sets the maximum amount Tile-requests that can be in the queue of the executor- Parameters:
tileRendererMaxQueueSizeActive- the maximum amount Tile-requests that can be in the queue of the executor
-
getTileRendererMaxPendingRequestsSize
int getTileRendererMaxPendingRequestsSize()Returns the maximum amount Tile-requests that can be in the queue of pending requests- Returns:
- the maximum amount Tile-requests that can be in the queue of pending requests
-
setTileRendererMaxPendingRequestsSize
void setTileRendererMaxPendingRequestsSize(int tileRendererMaxPendingRequestsSize) Sets the maximum amount Tile-requests that can be in the queue of the pending requests- Parameters:
tileRendererMaxPendingRequestsSize- the maximum amount Tile-requests that can be in the queue of pending requests
-
getTileCachingHeaderExpiryTime
int getTileCachingHeaderExpiryTime()Returns the expiry time of tiles in the clients browser-cache in seconds. A value of 0 means that the tile will not be cached.- Returns:
- the time a tile will be kept in the clients browser-cache
- See Also:
-
setTileCachingHeaderExpiryTime
void setTileCachingHeaderExpiryTime(int tileCachingHeaderExpiryTime) Sets the expiry time of tiles in the clients browser-cache in seconds. To disable caching on the client browser set this value to 0 (this will also disable the Etag-Header).- Parameters:
tileCachingHeaderExpiryTime- the time a tile will be kept in the clients browser-cache- See Also:
-
isCacheFilterEnabled
boolean isCacheFilterEnabled()Returns true if the Servlet-Filter that sets caching-headers to static resources is enabled or not (default: true)- Returns:
- true if it is enabled, false otherwise
-
setCacheFilterEnabled
void setCacheFilterEnabled(boolean cacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to static resources- Parameters:
cacheFilterEnabled- enable or disable the Servlet-Filter
-
isNoCacheFilterEnabled
boolean isNoCacheFilterEnabled()Returns true if the Servlet-Filter that sets caching-headers to static resources is enabled or not (default: true)- Returns:
- true if it is enabled, false otherwise
-
setNoCacheFilterEnabled
void setNoCacheFilterEnabled(boolean noCacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to static resources- Parameters:
noCacheFilterEnabled- enable or disable the Servlet-Filter
-
isTileCacheFilterEnabled
boolean isTileCacheFilterEnabled()Returns true if the Servlet-Filter that sets caching-headers to Tiles is enabled or not (default: true)- Returns:
- true if it is enabled, false otherwise
-
setTileCacheFilterEnabled
void setTileCacheFilterEnabled(boolean tileCacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to Tiles- Parameters:
tileCacheFilterEnabled- enable or disable the Servlet-Filter
-
getFlowWorkerPoolCoreSize
int getFlowWorkerPoolCoreSize()- Returns:
- The core pool size for jadice flow workers which is the minimum number of workers to keep alive (and not allow to time out etc).
-
setFlowWorkerPoolCoreSize
void setFlowWorkerPoolCoreSize(int flowWorkerPoolCoreSize) Sets the core pool size for jadice flow workers which is the minimum number of workers to keep alive (and not allow to time out etc). Must not be less than 0- Parameters:
flowWorkerPoolCoreSize-
-
getFlowWorkerPoolMaxSize
int getFlowWorkerPoolMaxSize()- Returns:
- the maximum pool size for flow workers.
-
setFlowWorkerPoolMaxSize
void setFlowWorkerPoolMaxSize(int flowWorkerPoolMaxSize) Sets the maximum pool size for flow workers.- Parameters:
flowWorkerPoolMaxSize- Must be greater than 0
-
getFlowWorkerMaxQueueSizeActive
int getFlowWorkerMaxQueueSizeActive()Returns the maximum amount flow requests that can be in the queue of the executor- Returns:
- the maximum amount flow requests that can be in the queue of the executor
-
setFlowWorkerMaxQueueSizeActive
void setFlowWorkerMaxQueueSizeActive(int flowWorkerMaxQueueSizeActive) Sets the maximum amount of flow requests that can be in the queue of the executor- Parameters:
flowWorkerMaxQueueSizeActive- the maximum amount flow requests that can be in the queue of the executor
-
setRenderControlsMetricsFilters
Clear the existing list and add all filters passed in- Parameters:
filters- thefiltersused for exposing finer grained render metrics
-
getRenderControlsMetricsFilters
List<RenderControlsMetricsFilter> getRenderControlsMetricsFilters()- Returns:
- the
filtersused for exposing finer grained render metrics
-
setDocumentReadMetricsFilters
Clear the existing list and add all filters passed in- Parameters:
filters- thefiltersused for exposing finer grained document read metrics
-
getDocumentReadMetricsFilters
List<DocumentReadMetricsFilter> getDocumentReadMetricsFilters()- Returns:
- the
filtersused for exposing finer grained document read metrics
-
setPageSegmentHandleMetricsFilters
void setPageSegmentHandleMetricsFilters(List<PageSegmentHandleMetricsFilter> pageSegmentHandleMetricsFilters) Clear the existing list and add all filters passed in- Parameters:
pageSegmentHandleMetricsFilters- thefiltersused for exposing finer grained render metrics, that are PageSegmentHandler based.
-
getPageSegmentHandleMetricsFilters
List<PageSegmentHandleMetricsFilter> getPageSegmentHandleMetricsFilters()- Returns:
- the
filtersused for exposing finer grained render metrics, that are PageSegmentHandler based.
-
isUseSessionSpecificDocumentKey
boolean isUseSessionSpecificDocumentKey()- Returns:
-
setUseSessionSpecificDocumentKey
void setUseSessionSpecificDocumentKey(boolean useSessionSpecificDocumentKey) The PlainInvocationContext in the TileServlet uses the authentication-info of AuthenticationInfoManager if it is present. To receive the authentication-info the client-id is used. The client-id is generated by the client at creation time of the client (application loaded in browser).If this flag is true, instead of the browser-defined client-id the session-id is used (HttpSession).
- Parameters:
useSessionSpecificDocumentKey- set true, if you want to use the session-id for the client-id while retrieving the authentication-info in the id-generation step of the TileServlet
-
isTileCancellationEnabled
boolean isTileCancellationEnabled() -
setTileCancellationEnabled
void setTileCancellationEnabled(boolean tileCancellationEnabled) -
setTextContentBunchSize
void setTextContentBunchSize(int bunchSize) If using thecom.levigo.jadice.web.client.config.ClientConfiguration'ssetIsTextContentStreamingmethod, you can set here how manyLineobjects you want to bundle before sending the bundle within one single message over the JWT connection framework- Parameters:
bunchSize- how manylinesto bundle
-
getTextContentBunchSize
int getTextContentBunchSize()- Returns:
- the value set in
setTextContentBunchSize(int)
-
getPdfStructureReadStrategy
com.levigo.jadice.format.pdf.settings.PDFStructureReaderSettings.PDFStructureReadStrategy getPdfStructureReadStrategy()Returns the configured Read-Strategy for PDF files.- Returns:
-
setPdfStructureReadStrategy
void setPdfStructureReadStrategy(com.levigo.jadice.format.pdf.settings.PDFStructureReaderSettings.PDFStructureReadStrategy pdfStructureReadStrategy) Sets the Read-Strategy for PDF files.- Parameters:
pdfStructureReadStrategy-
-
getSaveAnnotationHandler
Deprecated, for removal: This API element is subject to removal in a future version.Use AnnotationService instead -
setSaveAnnotationHandlers
@Deprecated(forRemoval=true) void setSaveAnnotationHandlers(HashMap<String, SaveAnnotationsHandler> saveAnnotationsHandlers) Deprecated, for removal: This API element is subject to removal in a future version.Make your SaveAnnotationsHandler a SpringComponentso it will be automatically registered -
getSaveAnnotationsHandlers
Deprecated, for removal: This API element is subject to removal in a future version.For internal use only -
getDocumentReadSubTaskTimeout
long getDocumentReadSubTaskTimeout()Returns the timeout for document read subtasks.- Returns:
- timeout in milliseconds.
-
setDocumentReadSubTaskTimeout
void setDocumentReadSubTaskTimeout(long documentReadSubTaskTimeout) Sets the timeout for document read subtasks.- Parameters:
documentReadSubTaskTimeout- timeout in milliseconds.
-
isTileSecurityFilterEnabled
boolean isTileSecurityFilterEnabled()Returns true, when the Tile-Security-Filter is enabled. Caution: the Filter only works if an HTTP-session is present (e.g. by enablingConnectionConfiguration.setAlwaysCreateHttpSession(boolean)). The Tile-Security-Filter works by binding a client-id to an HTTP-session-id. With this feature you can not copy a tile-url and open it with a different client (which is generally a good idea).- Returns:
- true if the filter is enabled
-
setTileSecurityFilterEnabled
void setTileSecurityFilterEnabled(boolean tileSecurityFilterEnabled) Enable or disable the Tile-Security-Filter. Caution: the Filter only works if an HTTP-session is present (e.g. by enablingConnectionConfiguration.setAlwaysCreateHttpSession(boolean)). The Tile-Security-Filter works by binding a client-id to an HTTP-session-id. With this feature you can not copy a tile-url and open it with a different client (which is generally a good idea).- Parameters:
tileSecurityFilterEnabled- enable or disable the filter
-
getExportConfiguration
ExportConfiguration getExportConfiguration()
-