code: function DataResponse(message, successHandler, errorHandler) {
  
  	var isUsed = false;
  
  	/**
  	 * Sends a successful response.
  	 */
  	function success() {
  		checkIfUsed();
  		successHandler.call(that, message);
  	}
  
  	/**
  	 * Sends an error response. The optional exception type parameter that can be used
  	 * to issue a proper type of exception depends on the event handled as described in the following table:
  	 * <ul>
  	 * <li>init: "data"</li>
  	 * <li>subscribe: "subscription"</li>
  	 * <li>unsubscribe: "subscription"</li>
  	 * </ul>
  	 *
  	 * @param {String} exceptionMessage exception message
  	 * @param {String} [exceptionType] exception type
  	 */
  	function error(exceptionMessage, exceptionType) {
  		checkIfUsed();
  		errorHandler.call(that, message, exceptionMessage, exceptionType);
  	}
  
  	function checkIfUsed() {
  		if (isUsed){
  			throw new Error("Response for request " + message.id + " has been already used");
  		} else {
  			isUsed = true;
  		}		
  	}
  
  	// Public methods
  	that = {
  		error: error,
  		success: success
  	};
  
  
  	return that;
  }
docs: <p>DataResponse constructor.
  An instance of this class is passed as argument to an event listener,
  and must be used to respond to the remote adapter request,
  using the success method or the error method.</p>
  
  @class
  Private constructor arguments:
  {Object} message the request data
  {Function} successHandler a callback to the DataProvider function for a successful response
  {Function} errorHandler a callback to the DataProvider function for an error response