예제 #1
0
    public InputConnection handleResourceRequest(BrowserFieldRequest request) throws Exception {
      String url = request.getURL();
      if (RhodesApp.getInstance().isRhodesAppUrl(url) || URI.isLocalData(url)) {
        HttpConnection connection = Utilities.makeConnection(url, request.getHeaders(), null, null);

        return connection;
      } else return super.handleResourceRequest(request);
    }
예제 #2
0
  public NetResponse pushData(String strUrl, String strBody, IRhoSession oSession)
      throws Exception {
    m_bCancel = false;

    if (RhodesApp.getInstance().isRhodesAppUrl(strUrl)) {
      IRhoRubyHelper helper = RhoClassFactory.createRhoRubyHelper();
      return helper.postUrl(strUrl, strBody);
    }

    return doRequest("POST", strUrl, strBody, oSession, null);
  }
예제 #3
0
  void doDispatch(Properties reqHash, String strIndex) throws IOException {
    reqHash.setProperty("request-method", this.method);
    reqHash.setProperty("request-uri", uri.getPath());
    reqHash.setProperty("request-query", uri.getQueryString());

    if (postData != null && postData.size() > 0) {
      if (!RHOCONF().getBool("log_skip_post")) LOG.TRACE(postData.toString());
      reqHash.setProperty("request-body", postData.toString());
    }

    RubyValue res = RhoRuby.processRequest(reqHash, reqHeaders, resHeaders, strIndex);
    processResponse(res);

    RhodesApp.getInstance().keepLastVisitedUrl(url_external);
    LOG.INFO("dispatch end");
  }
예제 #4
0
    SyncNotification(String strUrl, String strParams, boolean bRemoveAfterFire) {
      if (strUrl.length() > 0) m_strUrl = RhodesApp.getInstance().canonicalizeRhoUrl(strUrl);

      m_strParams = strParams;
      m_bRemoveAfterFire = bRemoveAfterFire;
    }
예제 #5
0
 public String resolveUrl(String strUrl) throws Exception {
   return RhodesApp.getInstance().canonicalizeRhoUrl(strUrl);
 }