| java.lang.Object org.directwebremoting.proxy.io.Context jsx3.lang.Object jsx3.net.Request
Request | public class Request extends jsx3.lang.Object (Code) | | A generic wrapper to hide the complexities and API-specifics of the native XMLHTTP control for a given browser.
Developers wishing to create/modify XML documents can use this class to access common XMLHTTP methods.
Note that when using this interface to post xml content to a server, the called server may expect the content
type to be set for the posting. For example,
objRequest.setRequestHeader("Content-Type", "text/xml");
author: Joe Walker [joe at getahead dot org] author: DRAPGEN - Dwr Reverse Ajax Proxy GENerator |
Field Summary | |
final public static String | EVENT_ON_RESPONSE Event type published when the response has loaded. | final public static String | EVENT_ON_TIMEOUT Event type published when the server has not responded after the specified timeout period. |
Method Summary | |
public jsx3.net.Request | abort() Aborts the request. | public void | getAllResponseHeaders(org.directwebremoting.proxy.Callback<String> callback) Gets the value of all the HTTP headers. | public void | getResponseHeader(String strName, org.directwebremoting.proxy.Callback<String> callback) Gets the value of a specific HTTP response header. | public void | getResponseText(org.directwebremoting.proxy.Callback<String> callback) Gets the content of the response as string. | public jsx3.xml.CdfDocument | getResponseXML() Gets the content of the response as an XML document. | public T | getResponseXML(Class<T> returnType) Gets the content of the response as an XML document. | public void | getStatus(org.directwebremoting.proxy.Callback<Integer> callback) Gets the HTTP response code (e.g. | public void | getStatusText(org.directwebremoting.proxy.Callback<String> callback) Gets the HTTP response line status (e.g. | public void | getURL(org.directwebremoting.proxy.Callback<String> callback) Gets the URL passed when opening this request. | public jsx3.net.Request | open(String strMethod, java.net.URI strURL, boolean bAsync, String strUser, String strPass) Initializes the request, and specifies the method, URL, and authentication information for the request.
Parameters: strMethod - The HTTP method used to open the connection. | public jsx3.net.Request | open(String strMethod, String strURL, boolean bAsync, String strUser, String strPass) Initializes the request, and specifies the method, URL, and authentication information for the request.
Parameters: strMethod - The HTTP method used to open the connection. | public void | publish(jsx3.lang.Object objEvent, org.directwebremoting.proxy.Callback<Integer> callback) Publishes an event to all subscribed objects. | public jsx3.net.Request | send(String strContent, int intTimeout) Sends the request.
Parameters: strContent - The content to send for a POST request. Parameters: intTimeout - the number milliseconds to wait before publishing a timeout event. | public jsx3.net.Request | setRequestHeader(String strName, String strValue) Sets the value of a specific HTTP request header. | public void | subscribe(Object[] strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, jsx3.lang.Object objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, String objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, String objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, jsx3.lang.Object objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | unsubscribe(String strEventId, String objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(Object[] strEventId, String objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(Object[] strEventId, jsx3.lang.Object objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(String strEventId, jsx3.lang.Object objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribeAll(String strEventId) Unsubscribes all subscribed objects to a type of event published by this object. |
EVENT_ON_RESPONSE | final public static String EVENT_ON_RESPONSE(Code) | | Event type published when the response has loaded.
|
EVENT_ON_TIMEOUT | final public static String EVENT_ON_TIMEOUT(Code) | | Event type published when the server has not responded after the specified timeout period.
|
Request | public Request(Context context, String extension, ScriptProxy scriptProxy)(Code) | | All reverse ajax proxies need context to work from
Parameters: scriptProxy - The place we are writing scripts to Parameters: context - The script that got us to where we are now |
Request | public Request(String id)(Code) | | The instance initializer.
Parameters: id - If the call will be asynchronous, assigns a unique identifier. |
getResponseXML | public jsx3.xml.CdfDocument getResponseXML()(Code) | | Gets the content of the response as an XML document. If the response is not a valid XML document,
null is returned.
|
getResponseXML | public T getResponseXML(Class<T> returnType)(Code) | | Gets the content of the response as an XML document. If the response is not a valid XML document,
null is returned.
Parameters: returnType - The expected return type |
open | public jsx3.net.Request open(String strMethod, java.net.URI strURL, boolean bAsync, String strUser, String strPass)(Code) | | Initializes the request, and specifies the method, URL, and authentication information for the request.
Parameters: strMethod - The HTTP method used to open the connection. Valid values include: GET, POST, or PUT. Parameters: strURL - The requested URL. This can be either an absolute URL, such as "http://www.TIBCO.com", or a relative URL, such as "../MyPath/MyFile". Parameters: bAsync - whether to issue the request asynchronously, if true this class will use the EventDispatcher interface to publish an event on response or timeout. Parameters: strUser - The name of the user for authentication. If this parameter is null ("") or missing and the site requires authentication, the native HTTP control will display a logon window. Parameters: strPass - The password for authentication. This parameter is ignored if the user parameter is null ("") or missing. this object. |
open | public jsx3.net.Request open(String strMethod, String strURL, boolean bAsync, String strUser, String strPass)(Code) | | Initializes the request, and specifies the method, URL, and authentication information for the request.
Parameters: strMethod - The HTTP method used to open the connection. Valid values include: GET, POST, or PUT. Parameters: strURL - The requested URL. This can be either an absolute URL, such as "http://www.TIBCO.com", or a relative URL, such as "../MyPath/MyFile". Parameters: bAsync - whether to issue the request asynchronously, if true this class will use the EventDispatcher interface to publish an event on response or timeout. Parameters: strUser - The name of the user for authentication. If this parameter is null ("") or missing and the site requires authentication, the native HTTP control will display a logon window. Parameters: strPass - The password for authentication. This parameter is ignored if the user parameter is null ("") or missing. this object. |
publish | public void publish(jsx3.lang.Object objEvent, org.directwebremoting.proxy.Callback<Integer> callback)(Code) | | Publishes an event to all subscribed objects.
Parameters: objEvent - the event, should have at least a field 'subject' that is the event id, another common field is 'target' (target will default to this instance) Parameters: callback - the number of listeners to which the event was broadcast |
send | public jsx3.net.Request send(String strContent, int intTimeout)(Code) | | Sends the request.
Parameters: strContent - The content to send for a POST request. Parameters: intTimeout - the number milliseconds to wait before publishing a timeout event. This only appliesto asynchronous requests. If used, subscribe to the jsx3.net.Request.EVENT_ON_TIMEOUT event tobe notified of a timeout. this object. |
setRequestHeader | public jsx3.net.Request setRequestHeader(String strName, String strValue)(Code) | | Sets the value of a specific HTTP request header. The open() method should be called before calling
this method.
Parameters: strName - the name for the request header to send to the server with the request content. Parameters: strValue - the value for the request header to send to the server with the request content. this object. |
subscribe | public void subscribe(Object[] strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, jsx3.lang.Object objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, String objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, String objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, jsx3.lang.Object objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
unsubscribe | public void unsubscribe(String strEventId, String objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(Object[] strEventId, String objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(Object[] strEventId, jsx3.lang.Object objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(String strEventId, jsx3.lang.Object objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribeAll | public void unsubscribeAll(String strEventId)(Code) | | Unsubscribes all subscribed objects to a type of event published by this object.
Parameters: strEventId - the event type |
Methods inherited from jsx3.lang.Object | public void ignoreReturn()(Code)(Java Doc)
|
|
|