Interface ClientServiceConfig
- All Superinterfaces:
- Config
 This is the configuration for the (optional) client service within a
 Web Server configuration. The client service handles
 Diffusion client connections.
 
These properties may only be set before a Diffusion Server is started.
- Since:
- 4.4
- 
Method SummaryModifier and TypeMethodDescriptionGets the CORS origin value.intGets the maximum inbound request size.longGets the message sequence timeout.getName()Gets the service name.Gets the WebSocket origin pattern.booleanIs the session cookie disabled?booleanisDebug()Is debug set?voidsetCookieDisabled(boolean disabled) Sets the session cookie as enabled/disabled.voidsetCORSOrigin(String origin) Sets the CORS origin.voidsetDebug(boolean debug) Sets debug.voidsetMaximumInboundRequestSize(int maxSize) Sets the maximum inbound request size.voidsetMessageSequenceTimeout(long timeout) Sets the message sequence timeout.voidsetWebsocketOrigin(String origin) Sets the WebSocket origin patten.
- 
Method Details- 
getNameString getName()Gets the service name.- Returns:
- the service name
 
- 
setMessageSequenceTimeoutSets the message sequence timeout.This is used with HTTP clients to indicate how long to wait for a missing message in a sequence of messages before assuming it is lost and closing the client session. If not specified, a default value of 4 seconds is used. - Parameters:
- timeout- value in milliseconds. If this exceeds one hour (3600000 ms), a warning will be logged and the timeout will be set to one hour.
- Throws:
- ConfigException- if unable to set the property
 
- 
getMessageSequenceTimeoutlong getMessageSequenceTimeout()Gets the message sequence timeout.- Returns:
- message sequence timeout
 
- 
setWebsocketOriginSets the WebSocket origin patten.The server will reject a WebSocket connection upgrade request that has an Origin header if the header does not match this regular expression. The default value is ".*", which allows all WebSocket upgrade requests. - Parameters:
- origin- the web socket origin regular expression
- Throws:
- ConfigException- if unable to set the property
 
- 
getWebsocketOriginString getWebsocketOrigin()Gets the WebSocket origin pattern.- Returns:
- the web socket origin regular expression
 
- 
setCORSOriginSets the CORS origin.This is used to control access from client web (XHR) to diffusion. This element will enable Cross Origin Resource Sharing. This is a REGEX pattern that will match the origin of the request. ".*" matches anything so all requests are allowed. If this is not explicitly set, the service will not be able to handle CORS requests - Parameters:
- origin- the CORS origin
- Throws:
- ConfigException- if unable to set the property
 
- 
getCORSOriginString getCORSOrigin()Gets the CORS origin value.- Returns:
- CORS origin or null if not set
 
- 
setMaximumInboundRequestSizeSets the maximum inbound request size.The maximum number of bytes that the HTTP request can have. A value of zero (the default) indicates that the maximum message size will be used. - Parameters:
- maxSize- size in bytes
- Throws:
- ConfigException- if unable to set the property
 
- 
getMaximumInboundRequestSizeint getMaximumInboundRequestSize()Gets the maximum inbound request size.- Returns:
- maximum inbound request size.
 
- 
setCookieDisabledSets the session cookie as enabled/disabled. If disabled (set as true), the "Set-Cookie" header will not be present in the HTTP response for each client connection. Default is false (cookie enabled).- Parameters:
- disabled- set cookie as enabled/disabled
- Throws:
- ConfigException- if unable to set the property
- Since:
- 5.5
 
- 
isCookieDisabledboolean isCookieDisabled()Is the session cookie disabled?- Returns:
- true if the cookie has been disabled
- Since:
- 5.5
 
- 
setDebugvoid setDebug(boolean debug) Sets debug.Default is false. - Parameters:
- debug- set debug on or off
 
- 
isDebugboolean isDebug()Is debug set?- Returns:
- true if set
 
 
-