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 interface
Holds the initial configuration parameters the network layer will use.static enum
Enum to define the supported PNG compressions for tile rendering -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the timeout for document read subtasks.int
Returns the maximum amount flow requests that can be in the queue of the executorint
int
int
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).int
Returns the maximum pool size for general tasks.int
Set the maximum size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskService
int
Get the size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskService
com.levigo.jadice.format.pdf.settings.PDFStructureReaderSettings.PDFStructureReadStrategy
Returns the configured Read-Strategy for PDF files.int
int
Returns the expiry time of tiles in the clients browser-cache in seconds.Returns theServerConfiguration.TileCompressionType
used by theTileServlet
to write the PNG tilesint
Returns the amount of how many rendering-threads a single client can utilizeint
Returns the maximum amount Tile-requests that can be in the queue of pending requestsint
Returns the maximum amount Tile-requests that can be in the queue of the executorint
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).int
Returns the maximum pool size for tile rendering.boolean
Returns true if the Servlet-Filter that sets caching-headers to static resources is enabled or not (default: true)boolean
Returns true if the Servlet-Filter that sets caching-headers to static resources is enabled or not (default: true)boolean
Returns true if the Servlet-Filter that sets caching-headers to Tiles is enabled or not (default: true)boolean
Returns whether server side tile caching is enabled or not.boolean
boolean
Returns true, when the Tile-Security-Filter is enabled.boolean
void
setCacheFilterEnabled
(boolean cacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to static resourcesvoid
setClientConfiguration
(ClientConfiguration clientConfiguration) replace the default configurationvoid
Clear the existing list and add all filters passed invoid
setDocumentReadSubTaskTimeout
(long documentReadSubTaskTimeout) Sets the timeout for document read subtasks.void
setFlowWorkerMaxQueueSizeActive
(int flowWorkerMaxQueueSizeActive) Sets the maximum amount of flow requests that can be in the queue of the executorvoid
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).void
setFlowWorkerPoolMaxSize
(int flowWorkerPoolMaxSize) Sets the maximum pool size for flow workers.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).void
setGeneralPoolMaxSize
(int generalPoolMaxSize) Sets the maximum pool size for general tasks.void
setJadiceCoreMaxPoolSize
(int jadiceCoreMaxPoolSize) Set the maximum size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskService
void
setJadiceCorePoolSize
(int jadiceCorePoolSize) Set the size of the thread pool, that is used by jadice utils / jadice core inThreadPoolTaskService
void
setMetricNames
(MetricNamesConfiguration metricNames) void
setNoCacheFilterEnabled
(boolean noCacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to static resourcesvoid
setPageSegmentHandleMetricsFilters
(List<PageSegmentHandleMetricsFilter> pageSegmentHandleMetricsFilters) Clear the existing list and add all filters passed invoid
setPdfStructureReadStrategy
(com.levigo.jadice.format.pdf.settings.PDFStructureReaderSettings.PDFStructureReadStrategy pdfStructureReadStrategy) Sets the Read-Strategy for PDF files.void
Clear the existing list and add all filters passed invoid
setSaveAnnotationHandlers
(HashMap<String, SaveAnnotationsHandler> saveAnnotationsHandlers) void
setTextContentBunchSize
(int bunchSize) If using thecom.levigo.jadice.web.client.config.ClientConfiguration's
setIsTextContentStreaming
method, you can set here how manyLine
objects you want to bundle before sending the bundle within one single message over the JWT connection frameworkvoid
setTileCacheFilterEnabled
(boolean tileCacheFilterEnabled) Enabled/disables the Servlet-Filter that sets caching-headers to Tilesvoid
setTileCachingEnabled
(boolean tileCachingEnabled) This enables the server side caching of tiles, so that they do not need to be rendered every time.void
setTileCachingHeaderExpiryTime
(int tileCachingHeaderExpiryTime) Sets the expiry time of tiles in the clients browser-cache in seconds.void
setTileCancellationEnabled
(boolean tileCancellationEnabled) void
setTileCompressionType
(ServerConfiguration.TileCompressionType tileCompressionType) Sets theServerConfiguration.TileCompressionType
used by theTileServlet
to write the PNG tilesvoid
setTileRendererMaxParallelRenderingPerClient
(int tileRendererMaxParallelRenderingPerClient) Sets the number of how many rendering-threads a single client can utilize.void
setTileRendererMaxPendingRequestsSize
(int tileRendererMaxPendingRequestsSize) Sets the maximum amount Tile-requests that can be in the queue of the pending requestsvoid
setTileRendererMaxQueueSizeActive
(int tileRendererMaxQueueSizeActive) Sets the maximum amount Tile-requests that can be in the queue of the executorvoid
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).void
setTileRendererPoolMaxSize
(int tileRendererPoolMaxSize) Sets the maximum pool size for tile rendering.void
setTileSecurityFilterEnabled
(boolean tileSecurityFilterEnabled) Enable or disable the Tile-Security-Filter.void
setUseSessionSpecificDocumentKey
(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:
true
if the server side tile caching is enabled,false
if 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.TileCompressionType
used by theTileServlet
to write the PNG tiles- Returns:
- the TileCompressionType
-
setTileCompressionType
Sets theServerConfiguration.TileCompressionType
used by theTileServlet
to write the PNG tiles- Parameters:
tileCompressionType
- the TileCompressionType
-
getNetworkConfiguration
ServerConfiguration.NetworkConfiguration getNetworkConfiguration()- Returns:
- the
ServerConfiguration.NetworkConfiguration
used to initialize values of the network layer.
-
getClientConfiguration
ClientConfiguration getClientConfiguration()- Returns:
- the
ClientConfiguration
used to expose configs for all clients by the server
-
setClientConfiguration
replace the default configuration- Parameters:
clientConfiguration
- theClientConfiguration
used to expose configs for all clients by the server
-
getMetricNames
MetricNamesConfiguration getMetricNames()- Returns:
- the
MetricNamesConfiguration
used to individually rename metrics generated by the jadice web toolkit
-
setMetricNames
- Parameters:
metricNames
- set theMetricNamesConfiguration
used 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
- thefilters
used for exposing finer grained render metrics
-
getRenderControlsMetricsFilters
List<RenderControlsMetricsFilter> getRenderControlsMetricsFilters()- Returns:
- the
filters
used for exposing finer grained render metrics
-
setDocumentReadMetricsFilters
Clear the existing list and add all filters passed in- Parameters:
filters
- thefilters
used for exposing finer grained document read metrics
-
getDocumentReadMetricsFilters
List<DocumentReadMetricsFilter> getDocumentReadMetricsFilters()- Returns:
- the
filters
used 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
- thefilters
used for exposing finer grained render metrics, that are PageSegmentHandler based.
-
getPageSegmentHandleMetricsFilters
List<PageSegmentHandleMetricsFilter> getPageSegmentHandleMetricsFilters()- Returns:
- the
filters
used 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's
setIsTextContentStreaming
method, you can set here how manyLine
objects you want to bundle before sending the bundle within one single message over the JWT connection framework- Parameters:
bunchSize
- how manylines
to 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
-
setSaveAnnotationHandlers
-
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
-