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); }
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); }
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"); }
SyncNotification(String strUrl, String strParams, boolean bRemoveAfterFire) { if (strUrl.length() > 0) m_strUrl = RhodesApp.getInstance().canonicalizeRhoUrl(strUrl); m_strParams = strParams; m_bRemoveAfterFire = bRemoveAfterFire; }
public String resolveUrl(String strUrl) throws Exception { return RhodesApp.getInstance().canonicalizeRhoUrl(strUrl); }