public class AtmosphereParameters extends Object
Constructor and Description |
---|
AtmosphereParameters() |
Modifier and Type | Method and Description |
---|---|
Boolean |
getAttachHeadersAsQueryString() |
Integer |
getConnectTimeout() |
String |
getContentType() |
String |
getData() |
Boolean |
getDropAtmosphereHeaders() |
Boolean |
getEnableXDR() |
Boolean |
getExecuteCallbackBeforeReconnect() |
AtmosphereMethod |
getFallbackMethod() |
AtmosphereTransport |
getFallbackTransport() |
List<String> |
getHeaders() |
AtmosphereLogLevel |
getLogLevel() |
Integer |
getMaxReconnectOnClose() |
Integer |
getMaxRequest() |
Long |
getMaxStreamingLength() |
String |
getMessageDelimiter() |
AtmosphereMethod |
getMethod() |
Boolean |
getReadResponsesHeaders() |
Integer |
getReconnectInterval() |
Boolean |
getRewriteURL() |
Boolean |
getShared() |
Boolean |
getSuspend() |
Integer |
getTimeout() |
Boolean |
getTrackMessageLength() |
AtmosphereTransport |
getTransport() |
String |
getWebSocketImpl() |
String |
getWebSocketPathDelimiter() |
String |
getWebSocketUrl() |
Boolean |
getWithCredentials() |
void |
setAttachHeadersAsQueryString(Boolean attachHeadersAsQueryString)
Pass all headers as query string.
|
void |
setConnectTimeout(Integer connectTimeout)
The connect timeout.
|
void |
setContentType(String contentType)
The request's content-type
|
void |
setData(String data)
The request body (required when doing a POST or PUT)
|
void |
setDropAtmosphereHeaders(Boolean dropAtmosphereHeaders)
By default Atmosphere adds headers like X-Atmosphere-Transport, X-Cache-Date etc.
|
void |
setEnableXDR(Boolean enableXDR)
Enable CORS Cross Origin Resource Sharing.
|
void |
setExecuteCallbackBeforeReconnect(Boolean executeCallbackBeforeReconnect)
Execute the request's callback before or after reconnecting again to the server.
|
void |
setFallbackMethod(AtmosphereMethod fallbackMethod)
Used when the fallbackTransport gets used.
|
void |
setFallbackTransport(AtmosphereTransport fallbackTransport)
If either the client or server isn't able to support the selected 'transport', the fallback
value will be used.
|
void |
setHeaders(List<String> headers)
A list of headers to send
|
void |
setLogLevel(AtmosphereLogLevel logLevel)
The log level.
|
void |
setMaxReconnectOnClose(Integer maxReconnectOnClose)
*undocumented*
|
void |
setMaxRequest(Integer maxRequest)
The maximum number of requests that will be executed.
|
void |
setMaxStreamingLength(Long maxStreamingLength)
When the streaming transport is used, the maximum size of the body received.
|
void |
setMessageDelimiter(String messageDelimiter)
The token that delimit the message when the trackMessageLength attribute is used.
|
void |
setMethod(AtmosphereMethod method)
The HTTP method to use.
|
void |
setReadResponsesHeaders(Boolean readResponsesHeaders)
*undocumented*
|
void |
setReconnectInterval(Integer reconnectInterval)
The interval before an attempt to reconnect will be made.
|
void |
setRewriteURL(Boolean rewriteURL)
When enableXDR is set to true, the rewriteURL will be used to decide if the JSESSION_ID
cookie be send to the remote server.
|
void |
setShared(Boolean shared)
When set to true, Atmospere will share a connection between different browser tabs and
windows.
|
void |
setSuspend(Boolean suspend)
Suspend the request, always reconnect if the connection gets closed (for whatever reason),
independently of the transport used.
|
void |
setTimeout(Integer timeout)
The maximum time a connection stay opened when no message (or event) are sent or received.
|
void |
setTrackMessageLength(Boolean trackMessageLength)
Track the size of the received request.
|
void |
setTransport(AtmosphereTransport transport)
The transport Atmosphere will use between the client and server.
|
void |
setWebSocketImpl(String webSocketImpl)
The WebSocket API to use.
|
void |
setWebSocketPathDelimiter(String webSocketPathDelimiter)
The token delimiter used to wrap request.data when websockets messages are sent.
|
void |
setWebSocketUrl(String webSocketUrl)
The webSocketUrl appended to the request.data when defined.
|
void |
setWithCredentials(Boolean withCredentials)
True when user credentials are to be included in a cross-origin request.
|
JSONObject |
toJSON()
Transforms the paramters into a JSON object.
|
public Integer getConnectTimeout()
public void setConnectTimeout(Integer connectTimeout)
connectTimeout
- public Integer getReconnectInterval()
public void setReconnectInterval(Integer reconnectInterval)
reconnectInterval
- public Integer getTimeout()
public void setTimeout(Integer timeout)
timeout
- public AtmosphereMethod getMethod()
public void setMethod(AtmosphereMethod method)
method
- public void setHeaders(List<String> headers)
headers
- public String getContentType()
public void setContentType(String contentType)
contentType
- public String getData()
public void setData(String data)
data
- public Boolean getSuspend()
public void setSuspend(Boolean suspend)
suspend
- public Integer getMaxRequest()
public void setMaxRequest(Integer maxRequest)
maxRequest
- public Long getMaxStreamingLength()
public void setMaxStreamingLength(Long maxStreamingLength)
maxStreamingLength
- public AtmosphereLogLevel getLogLevel()
public void setLogLevel(AtmosphereLogLevel logLevel)
logLevel
- public AtmosphereTransport getTransport()
public void setTransport(AtmosphereTransport transport)
transport
- public AtmosphereTransport getFallbackTransport()
public void setFallbackTransport(AtmosphereTransport fallbackTransport)
fallbackTransport
- public AtmosphereMethod getFallbackMethod()
public void setFallbackMethod(AtmosphereMethod fallbackMethod)
fallbackMethod
- public String getWebSocketImpl()
public void setWebSocketImpl(String webSocketImpl)
webSocketImpl
- public String getWebSocketUrl()
public void setWebSocketUrl(String webSocketUrl)
data = webSocketPathDelimiter + webSocketUrl + webSocketPathDelimiter + data;
webSocketUrl
- public String getWebSocketPathDelimiter()
public void setWebSocketPathDelimiter(String webSocketPathDelimiter)
webSocketPathDelimiter
- public Boolean getEnableXDR()
public void setEnableXDR(Boolean enableXDR)
enableXDR
- public Boolean getRewriteURL()
public void setRewriteURL(Boolean rewriteURL)
rewriteURL
- public Boolean getAttachHeadersAsQueryString()
public void setAttachHeadersAsQueryString(Boolean attachHeadersAsQueryString)
attachHeadersAsQueryString
- public Boolean getDropAtmosphereHeaders()
public void setDropAtmosphereHeaders(Boolean dropAtmosphereHeaders)
dropAtmosphereHeaders
- public Boolean getExecuteCallbackBeforeReconnect()
public void setExecuteCallbackBeforeReconnect(Boolean executeCallbackBeforeReconnect)
executeCallbackBeforeReconnect
- public Boolean getWithCredentials()
public void setWithCredentials(Boolean withCredentials)
withCredentials
- public Boolean getTrackMessageLength()
public void setTrackMessageLength(Boolean trackMessageLength)
<message-length><message-delimiter> message <message-delimiter>This attribute is useful when your server side component send large chunked message. Using the trackMessageLength, the client will make sure the message has been fully received before invoking the callback. If not set, the callback might be invoked with partial message.
trackMessageLength
- public String getMessageDelimiter()
public void setMessageDelimiter(String messageDelimiter)
messageDelimiter
- public Boolean getShared()
public void setShared(Boolean shared)
shared
- public Boolean getReadResponsesHeaders()
public void setReadResponsesHeaders(Boolean readResponsesHeaders)
readResponsesHeaders
- public Integer getMaxReconnectOnClose()
public void setMaxReconnectOnClose(Integer maxReconnectOnClose)
maxReconnectOnClose
- public JSONObject toJSON()
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.