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

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

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

Request.toString介绍

暂无

代码示例

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

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

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. }
  10. if (MarkerLog.ENABLED) {
  11. final long threadId = Thread.currentThread().getId();
  12. if (Looper.myLooper() != Looper.getMainLooper()) {
  13. // If we finish marking off of the main thread, we need to
  14. // actually do it on the main thread to ensure correct ordering.
  15. Handler mainThread = new Handler(Looper.getMainLooper());
  16. mainThread.post(new Runnable() {
  17. @Override
  18. public void run() {
  19. mEventLog.add(tag, threadId);
  20. mEventLog.finish(this.toString());
  21. }
  22. });
  23. return;
  24. }
  25. mEventLog.add(tag, threadId);
  26. mEventLog.finish(this.toString());
  27. }
  28. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. @Override
  2. public String toString() {
  3. return super.toString();
  4. }

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

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

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. * <p>
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. mBody=null;
  8. if (mRequestQueue != null) {
  9. mRequestQueue.finish(this);
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. }
  10. if (MarkerLog.ENABLED) {
  11. final long threadId = Thread.currentThread().getId();
  12. if (Looper.myLooper() != Looper.getMainLooper()) {
  13. // If we finish marking off of the main thread, we need to
  14. // actually do it on the main thread to ensure correct ordering.
  15. Handler mainThread = new Handler(Looper.getMainLooper());
  16. mainThread.post(new Runnable() {
  17. @Override
  18. public void run() {
  19. mEventLog.add(tag, threadId);
  20. mEventLog.finish(this.toString());
  21. }
  22. });
  23. return;
  24. }
  25. mEventLog.add(tag, threadId);
  26. mEventLog.finish(this.toString());
  27. }
  28. }

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

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

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

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

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. /**
  2. * Notifies the request queue that this request has finished (successfully or with error).
  3. *
  4. * <p>Also dumps all events from this request's event log; for debugging.</p>
  5. */
  6. void finish(final String tag) {
  7. if (mRequestQueue != null) {
  8. mRequestQueue.finish(this);
  9. onFinish();
  10. }
  11. if (MarkerLog.ENABLED) {
  12. final long threadId = Thread.currentThread().getId();
  13. if (Looper.myLooper() != Looper.getMainLooper()) {
  14. // If we finish marking off of the main thread, we need to
  15. // actually do it on the main thread to ensure correct ordering.
  16. Handler mainThread = new Handler(Looper.getMainLooper());
  17. mainThread.post(new Runnable() {
  18. @Override
  19. public void run() {
  20. mEventLog.add(tag, threadId);
  21. mEventLog.finish(this.toString());
  22. }
  23. });
  24. return;
  25. }
  26. mEventLog.add(tag, threadId);
  27. mEventLog.finish(this.toString());
  28. }
  29. }

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

  1. mEventLog.finish(this.toString());

相关文章