|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Object
qx.core.Target
qx.io.remote.Request
public class Request
This class is used to send HTTP requests to the server.
Constructor Summary | |
---|---|
Request()
|
|
Request(java.lang.String vUrl)
|
|
Request(java.lang.String vUrl,
java.lang.String vMethod)
|
|
Request(java.lang.String vUrl,
java.lang.String vMethod,
java.lang.String vResponseType)
|
Method Summary | |
---|---|
void |
_applyMethod(java.lang.Object value,
java.lang.Object old)
|
void |
_applyProhibitCaching(java.lang.Object value,
java.lang.Object old)
|
void |
_applyResponseType(java.lang.Object value,
java.lang.Object old)
|
void |
_applyState(java.lang.Object value,
java.lang.Object old)
|
void |
_onaborted(Event e)
Event handler called when the request enters the aborted state. |
void |
_oncompleted(Event e)
Event handler called when the request enters the completed state. |
void |
_onfailed(Event e)
Event handler called when the request enters the failed state. |
void |
_onqueued(Event e)
Event handler called when the request enters the queued state. |
void |
_onreceiving(Event e)
Event handler called when the request enters the receiving state. |
void |
_onsending(Event e)
Event handler called when the request enters the sending state. |
void |
_ontimeout(Event e)
Event handler called when the request enters the timeout state. |
void |
abort()
Abort sending this request. |
boolean |
getAsynchronous()
Returns the (computed) value of the property asynchronous . |
boolean |
getCrossDomain()
Returns the (computed) value of the property crossDomain . |
java.lang.String |
getData()
Returns the (computed) value of the property data . |
boolean |
getFileUpload()
Returns the (computed) value of the property fileUpload . |
java.lang.Object |
getFormField(java.lang.String vId)
Get a form field in the POST request. |
java.lang.Object |
getFormFields()
Returns the object containg all form fields for the POST request. |
java.lang.Object |
getMethod()
Returns the (computed) value of the property method . |
java.lang.Object |
getParameter(java.lang.String vId)
Get a parameter in the request. |
java.lang.Object |
getParameters()
Returns the object containg all parameters for the request. |
java.lang.String |
getPassword()
Returns the (computed) value of the property password . |
boolean |
getProhibitCaching()
Returns the (computed) value of the property prohibitCaching . |
java.lang.String |
getRequestHeader(java.lang.String vId)
Retrieve the value of a header which was previously set |
java.lang.Object |
getRequestHeaders()
Return the object containing all of the headers which have been added. |
java.lang.Object |
getResponseType()
Returns the (computed) value of the property responseType . |
java.lang.Integer |
getSequenceNumber()
Obtain the sequence (id) number used for this request |
java.lang.Object |
getState()
Returns the (computed) value of the property state . |
java.lang.Integer |
getTimeout()
Returns the (computed) value of the property timeout . |
Exchange |
getTransport()
Returns the (computed) value of the property transport . |
java.lang.String |
getUrl()
Returns the (computed) value of the property url . |
boolean |
getUseBasicHttpAuth()
Returns the (computed) value of the property useBasicHttpAuth . |
java.lang.String |
getUsername()
Returns the (computed) value of the property username . |
void |
initAsynchronous(boolean arg)
Calls the apply method and dispatches the change event of the property asynchronous
with the default value defined by the class developer. |
void |
initCrossDomain(boolean arg)
Calls the apply method and dispatches the change event of the property crossDomain
with the default value defined by the class developer. |
void |
initData(java.lang.String arg)
Calls the apply method and dispatches the change event of the property data
with the default value defined by the class developer. |
void |
initFileUpload(boolean arg)
Calls the apply method and dispatches the change event of the property fileUpload
with the default value defined by the class developer. |
void |
initMethod(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property method
with the default value defined by the class developer. |
void |
initPassword(java.lang.String arg)
Calls the apply method and dispatches the change event of the property password
with the default value defined by the class developer. |
void |
initProhibitCaching(boolean arg)
Calls the apply method and dispatches the change event of the property prohibitCaching
with the default value defined by the class developer. |
void |
initResponseType(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property responseType
with the default value defined by the class developer. |
void |
initState(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property state
with the default value defined by the class developer. |
void |
initTimeout(java.lang.Integer arg)
Calls the apply method and dispatches the change event of the property timeout
with the default value defined by the class developer. |
void |
initTransport(Exchange arg)
Calls the apply method and dispatches the change event of the property transport
with the default value defined by the class developer. |
void |
initUrl(java.lang.String arg)
Calls the apply method and dispatches the change event of the property url
with the default value defined by the class developer. |
void |
initUseBasicHttpAuth(boolean arg)
Calls the apply method and dispatches the change event of the property useBasicHttpAuth
with the default value defined by the class developer. |
void |
initUsername(java.lang.String arg)
Calls the apply method and dispatches the change event of the property username
with the default value defined by the class developer. |
boolean |
isAborted()
Determine if this request is in the aborted state. |
boolean |
isAsynchronous()
Check whether the (computed) value of the boolean property asynchronous equals true . |
boolean |
isCompleted()
Determine if this request is in the completed state. |
boolean |
isConfigured()
Determine if this request is in the configured state. |
boolean |
isCrossDomain()
Check whether the (computed) value of the boolean property crossDomain equals true . |
boolean |
isFailed()
Determine if this request is in the failed state. |
boolean |
isFileUpload()
Check whether the (computed) value of the boolean property fileUpload equals true . |
boolean |
isProhibitCaching()
Check whether the (computed) value of the boolean property prohibitCaching equals true . |
boolean |
isQueued()
Determine if this request is in the queued state. |
boolean |
isReceiving()
Determine if this request is in the receiving state. |
boolean |
isSending()
Determine if this request is in the sending state. |
boolean |
isTimeout()
Determine if this request is in the timeout state. |
boolean |
isUseBasicHttpAuth()
Check whether the (computed) value of the boolean property useBasicHttpAuth equals true . |
void |
removeFormField(java.lang.String vId)
Remove a form field from the POST request. |
void |
removeParameter(java.lang.String vId)
Remove a parameter from the request. |
void |
removeRequestHeader(java.lang.String vId)
Remove a previously-added request header |
void |
reset()
Abort sending this request if it has not already been aborted. |
void |
resetAsynchronous()
Resets the user value of the property asynchronous . |
void |
resetCrossDomain()
Resets the user value of the property crossDomain . |
void |
resetData()
Resets the user value of the property data . |
void |
resetFileUpload()
Resets the user value of the property fileUpload . |
void |
resetMethod()
Resets the user value of the property method . |
void |
resetPassword()
Resets the user value of the property password . |
void |
resetProhibitCaching()
Resets the user value of the property prohibitCaching . |
void |
resetResponseType()
Resets the user value of the property responseType . |
void |
resetState()
Resets the user value of the property state . |
void |
resetTimeout()
Resets the user value of the property timeout . |
void |
resetTransport()
Resets the user value of the property transport . |
void |
resetUrl()
Resets the user value of the property url . |
void |
resetUseBasicHttpAuth()
Resets the user value of the property useBasicHttpAuth . |
void |
resetUsername()
Resets the user value of the property username . |
void |
send()
Schedule this request for transport to server. |
void |
setAsynchronous(boolean arg)
Sets the user value of the property asynchronous . |
void |
setCrossDomain(boolean arg)
Sets the user value of the property crossDomain . |
void |
setData(java.lang.String arg)
Sets the user value of the property data . |
void |
setFileUpload(boolean arg)
Sets the user value of the property fileUpload . |
void |
setFormField(java.lang.String vId,
java.lang.String vValue)
Add a form field to the POST request. |
void |
setMethod(java.lang.Object arg)
Sets the user value of the property method . |
void |
setParameter(java.lang.String vId,
java.lang.Object vValue)
Add a parameter to the request. |
void |
setPassword(java.lang.String arg)
Sets the user value of the property password . |
void |
setProhibitCaching(boolean arg)
Sets the user value of the property prohibitCaching . |
void |
setRequestHeader(java.lang.String vId,
java.lang.String vValue)
Add a request header to the request. |
void |
setResponseType(java.lang.Object arg)
Sets the user value of the property responseType . |
void |
setState(java.lang.Object arg)
Sets the user value of the property state . |
void |
setTimeout(java.lang.Integer arg)
Sets the user value of the property timeout . |
void |
setTransport(Exchange arg)
Sets the user value of the property transport . |
void |
setUrl(java.lang.String arg)
Sets the user value of the property url . |
void |
setUseBasicHttpAuth(boolean arg)
Sets the user value of the property useBasicHttpAuth . |
void |
setUsername(java.lang.String arg)
Sets the user value of the property username . |
boolean |
toggleAsynchronous()
Toggles the (computed) value of the boolean property asynchronous . |
boolean |
toggleCrossDomain()
Toggles the (computed) value of the boolean property crossDomain . |
boolean |
toggleFileUpload()
Toggles the (computed) value of the boolean property fileUpload . |
boolean |
toggleProhibitCaching()
Toggles the (computed) value of the boolean property prohibitCaching . |
boolean |
toggleUseBasicHttpAuth()
Toggles the (computed) value of the boolean property useBasicHttpAuth . |
Methods inherited from class qx.core.Target |
---|
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener |
Methods inherited from class qx.core.Object |
---|
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Request()
public Request(java.lang.String vUrl)
public Request(java.lang.String vUrl, java.lang.String vMethod)
public Request(java.lang.String vUrl, java.lang.String vMethod, java.lang.String vResponseType)
Method Detail |
---|
public void _applyMethod(java.lang.Object value, java.lang.Object old)
public void _applyProhibitCaching(java.lang.Object value, java.lang.Object old)
public void _applyResponseType(java.lang.Object value, java.lang.Object old)
public void _applyState(java.lang.Object value, java.lang.Object old)
public void _onaborted(Event e)
Event handler called when the request enters the aborted state.
public void _oncompleted(Event e)
Event handler called when the request enters the completed state.
public void _onfailed(Event e)
Event handler called when the request enters the failed state.
public void _onqueued(Event e)
Event handler called when the request enters the queued state.
public void _onreceiving(Event e)
Event handler called when the request enters the receiving state.
public void _onsending(Event e)
Event handler called when the request enters the sending state.
public void _ontimeout(Event e)
Event handler called when the request enters the timeout state.
public void abort()
Abort sending this request.
The request is removed from the singleton class qx.io.remote.RequestQueue’s list of pending events. If the request haven’t been scheduled this method is a noop.
public boolean getAsynchronous()
Returns the (computed) value of the property asynchronous
.
For further details take a look at the property definition: asynchronous
.
public boolean getCrossDomain()
Returns the (computed) value of the property crossDomain
.
For further details take a look at the property definition: crossDomain
.
public java.lang.String getData()
Returns the (computed) value of the property data
.
For further details take a look at the property definition: data
.
public boolean getFileUpload()
Returns the (computed) value of the property fileUpload
.
For further details take a look at the property definition: fileUpload
.
public java.lang.Object getFormField(java.lang.String vId)
Get a form field in the POST request.
public java.lang.Object getFormFields()
Returns the object containg all form fields for the POST request.
public java.lang.Object getMethod()
Returns the (computed) value of the property method
.
For further details take a look at the property definition: method
.
public java.lang.Object getParameter(java.lang.String vId)
Get a parameter in the request.
public java.lang.Object getParameters()
Returns the object containg all parameters for the request.
public java.lang.String getPassword()
Returns the (computed) value of the property password
.
For further details take a look at the property definition: password
.
public boolean getProhibitCaching()
Returns the (computed) value of the property prohibitCaching
.
For further details take a look at the property definition: prohibitCaching
.
public java.lang.String getRequestHeader(java.lang.String vId)
Retrieve the value of a header which was previously set
public java.lang.Object getRequestHeaders()
Return the object containing all of the headers which have been added.
public java.lang.Object getResponseType()
Returns the (computed) value of the property responseType
.
For further details take a look at the property definition: responseType
.
public java.lang.Integer getSequenceNumber()
Obtain the sequence (id) number used for this request
public java.lang.Object getState()
Returns the (computed) value of the property state
.
For further details take a look at the property definition: state
.
public java.lang.Integer getTimeout()
Returns the (computed) value of the property timeout
.
For further details take a look at the property definition: timeout
.
public Exchange getTransport()
Returns the (computed) value of the property transport
.
For further details take a look at the property definition: transport
.
public java.lang.String getUrl()
Returns the (computed) value of the property url
.
For further details take a look at the property definition: url
.
public boolean getUseBasicHttpAuth()
Returns the (computed) value of the property useBasicHttpAuth
.
For further details take a look at the property definition: useBasicHttpAuth
.
public java.lang.String getUsername()
Returns the (computed) value of the property username
.
For further details take a look at the property definition: username
.
public void initAsynchronous(boolean arg)
Calls the apply method and dispatches the change event of the property asynchronous
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: asynchronous
.
public void initCrossDomain(boolean arg)
Calls the apply method and dispatches the change event of the property crossDomain
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: crossDomain
.
public void initData(java.lang.String arg)
Calls the apply method and dispatches the change event of the property data
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: data
.
public void initFileUpload(boolean arg)
Calls the apply method and dispatches the change event of the property fileUpload
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: fileUpload
.
public void initMethod(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property method
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: method
.
public void initPassword(java.lang.String arg)
Calls the apply method and dispatches the change event of the property password
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: password
.
public void initProhibitCaching(boolean arg)
Calls the apply method and dispatches the change event of the property prohibitCaching
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: prohibitCaching
.
public void initResponseType(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property responseType
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: responseType
.
public void initState(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property state
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: state
.
public void initTimeout(java.lang.Integer arg)
Calls the apply method and dispatches the change event of the property timeout
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: timeout
.
public void initTransport(Exchange arg)
Calls the apply method and dispatches the change event of the property transport
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: transport
.
public void initUrl(java.lang.String arg)
Calls the apply method and dispatches the change event of the property url
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: url
.
public void initUseBasicHttpAuth(boolean arg)
Calls the apply method and dispatches the change event of the property useBasicHttpAuth
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: useBasicHttpAuth
.
public void initUsername(java.lang.String arg)
Calls the apply method and dispatches the change event of the property username
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: username
.
public boolean isAborted()
Determine if this request is in the aborted state.
public boolean isAsynchronous()
Check whether the (computed) value of the boolean property asynchronous
equals true
.
For further details take a look at the property definition: asynchronous
.
public boolean isCompleted()
Determine if this request is in the completed state.
public boolean isConfigured()
Determine if this request is in the configured state.
public boolean isCrossDomain()
Check whether the (computed) value of the boolean property crossDomain
equals true
.
For further details take a look at the property definition: crossDomain
.
public boolean isFailed()
Determine if this request is in the failed state.
public boolean isFileUpload()
Check whether the (computed) value of the boolean property fileUpload
equals true
.
For further details take a look at the property definition: fileUpload
.
public boolean isProhibitCaching()
Check whether the (computed) value of the boolean property prohibitCaching
equals true
.
For further details take a look at the property definition: prohibitCaching
.
public boolean isQueued()
Determine if this request is in the queued state.
public boolean isReceiving()
Determine if this request is in the receiving state.
public boolean isSending()
Determine if this request is in the sending state.
public boolean isTimeout()
Determine if this request is in the timeout state.
public boolean isUseBasicHttpAuth()
Check whether the (computed) value of the boolean property useBasicHttpAuth
equals true
.
For further details take a look at the property definition: useBasicHttpAuth
.
public void removeFormField(java.lang.String vId)
Remove a form field from the POST request.
public void removeParameter(java.lang.String vId)
Remove a parameter from the request.
public void removeRequestHeader(java.lang.String vId)
Remove a previously-added request header
public void reset()
Abort sending this request if it has not already been aborted.
public void resetAsynchronous()
Resets the user value of the property asynchronous
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: asynchronous
.
public void resetCrossDomain()
Resets the user value of the property crossDomain
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: crossDomain
.
public void resetData()
Resets the user value of the property data
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: data
.
public void resetFileUpload()
Resets the user value of the property fileUpload
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: fileUpload
.
public void resetMethod()
Resets the user value of the property method
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: method
.
public void resetPassword()
Resets the user value of the property password
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: password
.
public void resetProhibitCaching()
Resets the user value of the property prohibitCaching
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: prohibitCaching
.
public void resetResponseType()
Resets the user value of the property responseType
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: responseType
.
public void resetState()
Resets the user value of the property state
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: state
.
public void resetTimeout()
Resets the user value of the property timeout
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: timeout
.
public void resetTransport()
Resets the user value of the property transport
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: transport
.
public void resetUrl()
Resets the user value of the property url
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: url
.
public void resetUseBasicHttpAuth()
Resets the user value of the property useBasicHttpAuth
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: useBasicHttpAuth
.
public void resetUsername()
Resets the user value of the property username
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: username
.
public void send()
Schedule this request for transport to server.
The request is added to the singleton class qx.io.remote.RequestQueue’s list of pending requests.
public void setAsynchronous(boolean arg)
Sets the user value of the property asynchronous
.
For further details take a look at the property definition: asynchronous
.
public void setCrossDomain(boolean arg)
Sets the user value of the property crossDomain
.
For further details take a look at the property definition: crossDomain
.
public void setData(java.lang.String arg)
Sets the user value of the property data
.
For further details take a look at the property definition: data
.
public void setFileUpload(boolean arg)
Sets the user value of the property fileUpload
.
For further details take a look at the property definition: fileUpload
.
public void setFormField(java.lang.String vId, java.lang.String vValue)
Add a form field to the POST request.
NOTE: Adding any programatic form fields using this method will switch the Transport implementation to IframeTransport.
NOTE: Use of these programatic form fields disallow use of synchronous requests and cross-domain requests. Be sure that you do not need those features when setting these programatic form fields.
public void setMethod(java.lang.Object arg)
Sets the user value of the property method
.
For further details take a look at the property definition: method
.
public void setParameter(java.lang.String vId, java.lang.Object vValue)
Add a parameter to the request.
public void setPassword(java.lang.String arg)
Sets the user value of the property password
.
For further details take a look at the property definition: password
.
public void setProhibitCaching(boolean arg)
Sets the user value of the property prohibitCaching
.
For further details take a look at the property definition: prohibitCaching
.
public void setRequestHeader(java.lang.String vId, java.lang.String vValue)
Add a request header to the request.
Example: request.setRequestHeader(“Content-Type”, qx.util.Mime.HTML)
public void setResponseType(java.lang.Object arg)
Sets the user value of the property responseType
.
For further details take a look at the property definition: responseType
.
public void setState(java.lang.Object arg)
Sets the user value of the property state
.
For further details take a look at the property definition: state
.
public void setTimeout(java.lang.Integer arg)
Sets the user value of the property timeout
.
For further details take a look at the property definition: timeout
.
public void setTransport(Exchange arg)
Sets the user value of the property transport
.
For further details take a look at the property definition: transport
.
public void setUrl(java.lang.String arg)
Sets the user value of the property url
.
For further details take a look at the property definition: url
.
public void setUseBasicHttpAuth(boolean arg)
Sets the user value of the property useBasicHttpAuth
.
For further details take a look at the property definition: useBasicHttpAuth
.
public void setUsername(java.lang.String arg)
Sets the user value of the property username
.
For further details take a look at the property definition: username
.
public boolean toggleAsynchronous()
Toggles the (computed) value of the boolean property asynchronous
.
For further details take a look at the property definition: asynchronous
.
public boolean toggleCrossDomain()
Toggles the (computed) value of the boolean property crossDomain
.
For further details take a look at the property definition: crossDomain
.
public boolean toggleFileUpload()
Toggles the (computed) value of the boolean property fileUpload
.
For further details take a look at the property definition: fileUpload
.
public boolean toggleProhibitCaching()
Toggles the (computed) value of the boolean property prohibitCaching
.
For further details take a look at the property definition: prohibitCaching
.
public boolean toggleUseBasicHttpAuth()
Toggles the (computed) value of the boolean property useBasicHttpAuth
.
For further details take a look at the property definition: useBasicHttpAuth
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |