public static class AtmosphereRequest.AtmosphereRequestBuilder extends RequestBuilder<AtmosphereRequest.AtmosphereRequestBuilder>
AtmosphereRequest
. This builder configure the Atmosphere Protocol on the request object.decoders, derived, encoders, headers, method, queryString, resolver, transports, uri
Constructor and Description |
---|
AtmosphereRequest.AtmosphereRequestBuilder() |
Modifier and Type | Method and Description |
---|---|
AtmosphereRequest |
build()
Build a
Request . |
AtmosphereRequest.AtmosphereRequestBuilder |
cache(AtmosphereRequest.CACHE c)
Set the
AtmosphereRequest.CACHE used by the server side implementation of Atmosphere. |
AtmosphereRequest.AtmosphereRequestBuilder |
enableProtocol(boolean enableProtocol)
Set to true to enable the Atmosphere Protocol.
|
AtmosphereRequest.AtmosphereRequestBuilder |
paddingSize(int paddingSize)
Set the size of the padding bytes or String send by Atmosphere's PaddingAtmosphereInterceptor
|
AtmosphereRequest.AtmosphereRequestBuilder |
trackMessageLength(boolean trackMessageLength)
Turn on/off tracking message.
|
AtmosphereRequest.AtmosphereRequestBuilder |
trackMessageLengthDelimiter(String trackMessageLengthDelimiter)
Set the tracking delimiter.
|
AtmosphereRequest.AtmosphereRequestBuilder |
transport(Request.TRANSPORT t)
The
Request.TRANSPORT to use. |
decoder, decoders, encoder, encoders, header, headers, method, method, queryString, queryString, resolver, resolver, transports, uri, uri
public AtmosphereRequest.AtmosphereRequestBuilder()
public AtmosphereRequest.AtmosphereRequestBuilder transport(Request.TRANSPORT t)
Request.TRANSPORT
to use. This method can be invoked several time and the library will loop over the list
until one Request.TRANSPORT
succeed. The first added is always the first used.transport
in class RequestBuilder<AtmosphereRequest.AtmosphereRequestBuilder>
public AtmosphereRequest.AtmosphereRequestBuilder cache(AtmosphereRequest.CACHE c)
AtmosphereRequest.CACHE
used by the server side implementation of Atmosphere.c
- the cache type.public AtmosphereRequest.AtmosphereRequestBuilder trackMessageLength(boolean trackMessageLength)
trackMessageLength
- true to enable.public AtmosphereRequest.AtmosphereRequestBuilder trackMessageLengthDelimiter(String trackMessageLengthDelimiter)
trackMessageLengthDelimiter
- true to enable.public AtmosphereRequest.AtmosphereRequestBuilder enableProtocol(boolean enableProtocol)
enableProtocol
- false to disable.public AtmosphereRequest.AtmosphereRequestBuilder paddingSize(int paddingSize)
paddingSize
- false to disable.public AtmosphereRequest build()
Request
. IMPORTANT: if you are using stateful Decoder
, you must NOT call this method
more than once to prevent response corruption.
Important: You cannot call the build() method more than once if enableProtocol
or trackMessageLength
are set to true.build
in class RequestBuilder<AtmosphereRequest.AtmosphereRequestBuilder>
Request
Copyright © 2015. All Rights Reserved.