com.android.volley.Request.toString()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中com.android.volley.Request.toString方法的一些代码示例,展示了Request.toString的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.toString方法的具体详情如下:
包路径:com.android.volley.Request
类名称:Request
方法名:toString

Request.toString介绍

暂无

代码示例

代码示例来源:origin: chentao0707/SimplifyReader

mEventLog.finish(this.toString());
} else {
  long requestTime = SystemClock.elapsedRealtime() - mRequestBirthTime;
  if (requestTime >= SLOW_REQUEST_THRESHOLD_MS) {
    VolleyLog.d("%d ms: %s", requestTime, this.toString());

代码示例来源:origin: jiangqqlmj/FastDev4Android

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: mcxiaoke/android-volley

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: googolmo/OkVolley

@Override
public String toString() {
  return super.toString();
}

代码示例来源:origin: xuningjack/AndroidNet

mEventLog.finish(this.toString());
} else {
  long requestTime = SystemClock.elapsedRealtime() - mRequestBirthTime;
  if (requestTime >= SLOW_REQUEST_THRESHOLD_MS) {
    VolleyLog.d("%d ms: %s", requestTime, this.toString());

代码示例来源:origin: cat9/EasyVolley

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 * <p>
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  mBody=null;
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: chuyangliu/tastysnake

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: panxw/android-volley-manager

mEventLog.finish(this.toString());
} else {
  long requestTime = SystemClock.elapsedRealtime() - mRequestBirthTime;
  if (requestTime >= SLOW_REQUEST_THRESHOLD_MS) {
    VolleyLog.d("%d ms: %s", requestTime, this.toString());

代码示例来源:origin: AnandChowdhary/saga-android

mEventLog.finish(this.toString());
} else {
  long requestTime = SystemClock.elapsedRealtime() - mRequestBirthTime;
  if (requestTime >= SLOW_REQUEST_THRESHOLD_MS) {
    VolleyLog.d("%d ms: %s", requestTime, this.toString());

代码示例来源:origin: MewX/light-novel-library_Wenku8_Android

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: jungletian/TitanjumNote

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: com.mcxiaoke.volley/library

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: tazimete/android-app-food-delivery-system

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: tazimete/android-app-food-delivery-system

/**
 * Notifies the request queue that this request has finished (successfully or with error).
 *
 * <p>Also dumps all events from this request's event log; for debugging.</p>
 */
void finish(final String tag) {
  if (mRequestQueue != null) {
    mRequestQueue.finish(this);
    onFinish();
  }
  if (MarkerLog.ENABLED) {
    final long threadId = Thread.currentThread().getId();
    if (Looper.myLooper() != Looper.getMainLooper()) {
      // If we finish marking off of the main thread, we need to
      // actually do it on the main thread to ensure correct ordering.
      Handler mainThread = new Handler(Looper.getMainLooper());
      mainThread.post(new Runnable() {
        @Override
        public void run() {
          mEventLog.add(tag, threadId);
          mEventLog.finish(this.toString());
        }
      });
      return;
    }
    mEventLog.add(tag, threadId);
    mEventLog.finish(this.toString());
  }
}

代码示例来源:origin: CaMnter/AndroidLife

mEventLog.finish(this.toString());

相关文章