com.sage.swt.client.ui.communication
Class DefaultRequestDispatcher

java.lang.Object
  extended by com.sage.swt.client.ui.communication.DefaultRequestDispatcher
All Implemented Interfaces:
SwtRequestDispatcher

public class DefaultRequestDispatcher
extends java.lang.Object
implements SwtRequestDispatcher

Default implementation of a SwtRequestDispatcher.


Constructor Summary
DefaultRequestDispatcher(java.lang.String sessionID)
          Constructor.
 
Method Summary
 void request(SwtHttpRequest request, SwtHttpResponseHandler responseHandler)
          Sends an HTTP request to the server where the response's payload is in text form (in other words, it's not interpreted into other formats such as XML).
 void requestXML(SwtHttpRequest request, SwtXmlResponseHandler responseHandler)
          Sends an HTTP request to the server where the response's payload is supposed to be interpreted as an XML document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRequestDispatcher

public DefaultRequestDispatcher(java.lang.String sessionID)
Constructor.

Parameters:
sessionID - The session ID to add as a header for each request, or null (or empty) if the request dispatcher should not add session ID headers to any requests that it sends.
Method Detail

request

public void request(SwtHttpRequest request,
                    SwtHttpResponseHandler responseHandler)
Sends an HTTP request to the server where the response's payload is in text form (in other words, it's not interpreted into other formats such as XML).

Specified by:
request in interface SwtRequestDispatcher
Parameters:
request - The HTTP request to send.
responseHandler - The asynchronous response handler for the request.

requestXML

public void requestXML(SwtHttpRequest request,
                       SwtXmlResponseHandler responseHandler)
Sends an HTTP request to the server where the response's payload is supposed to be interpreted as an XML document.

Specified by:
requestXML in interface SwtRequestDispatcher
Parameters:
request - The HTTP request to send.
responseHandler - The asynchronous response handler for the request.


Copyright © 2011 Sage Software, Inc. All rights reserved.