java.lang.Object | |
↳ | com.google.gwt.user.client.rpc.RpcRequestBuilder |
This class encapsulates the logic necessary to configure a RequestBuilder for
use with an RPC proxy object. Users who wish to alter the specifics of the
HTTP requests issued by RPC proxy objects may override the protected
doXyz
methods and pass an instance of the subclass to
setRpcRequestBuilder(RpcRequestBuilder)
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | CONTENT_TYPE_HEADER | Used by doSetContentType(RequestBuilder, String) . |
|||||||||
String | MODULE_BASE_HEADER | Used by doFinish(RequestBuilder) . |
|||||||||
String | STRONG_NAME_HEADER | Used by doFinish(RequestBuilder) . |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Initialize the RpcRequestBuilder.
| |||||||||||
This method must be called to return the RequestBuilder that the RPC
request will be made with.
| |||||||||||
Sets the RequestCallback to be used by the RequestBuilder.
| |||||||||||
Sets the MIME content type to be used by the RequestBuilder.
| |||||||||||
Sets the request data to be sent in the request.
| |||||||||||
Sets the request id of the request.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called by
create(String) to instantiate the RequestBuilder object. | |||||||||||
Called by
finish() prior to returning the RequestBuilder to the
caller. | |||||||||||
Called by
setCallback(RequestCallback) . | |||||||||||
Called by
setContentType(String) . | |||||||||||
Called by
setRequestData(String) . | |||||||||||
Called by
setRequestId(int) . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Used by doFinish(RequestBuilder)
.
Used by doFinish(RequestBuilder)
.
Initialize the RpcRequestBuilder. This method must be called before any of
the other methods in this class may be called. Calling create
before calling finish()
will reset the state of the
RpcRequestBuilder.
This method delegates to doCreate(String)
to instantiate the
RequestBuilder.
serviceEntryPoint | The URL entry point |
---|
this
This method must be called to return the RequestBuilder that the RPC request will be made with.
This method will call doFinish(RequestBuilder)
before returning the current
RequestBuilder.
Sets the RequestCallback to be used by the RequestBuilder. Delegates to
doSetCallback(RequestBuilder, RequestCallback)
.
callback | the RequestCallback to be used by the RequestBuilder |
---|
this
Sets the MIME content type to be used by the RequestBuilder. Delegates to
doSetContentType(RequestBuilder, String)
.
contentType | the MIME content type to be used in the request |
---|
this
Sets the request data to be sent in the request. Delegates to
doSetRequestData(RequestBuilder, String)
.
data | the data to send |
---|
this
Sets the request id of the request. Delegates to doSetRequestId(RequestBuilder, int)
.
id | the issue number of the request |
---|
this
Called by create(String)
to instantiate the RequestBuilder object.
The default implementation creates a POST
RequestBuilder with
the given entry point.
serviceEntryPoint | the URL to which the request should be issued |
---|
Called by finish()
prior to returning the RequestBuilder to the
caller.
The default implementation sets the {@value #STRONG_NAME_HEADER} header to
the value returned by getPermutationStrongName()
.
rb | The RequestBuilder that is currently being configured |
---|
Called by setCallback(RequestCallback)
.
The default implementation calls
setCallback(RequestCallback)
.
rb | the RequestBuilder that is currently being configured |
---|---|
callback | the user-provided callback |
Called by setContentType(String)
.
The default implementation sets the {@value #CONTENT_TYPE_HEADER} header to
the value specified by contentType
by calling
setHeader(String, String)
.
rb | the RequestBuilder that is currently being configured |
---|---|
contentType | the desired MIME type of the request's contents |
Called by setRequestData(String)
.
The default implementation invokes
setRequestData(String)
.
rb | the RequestBuilder that is currently being configured |
---|---|
data | the data to send |
Called by setRequestId(int)
.
The default implementation is a no-op.
rb | the RequestBuilder that is currently being configured |
---|---|
id | the request's issue id |