Launch the navigation.

@param mContext    .
@param postcard    .
@param requestCode Set for startActivityForResult
@param callback    cb
433920
public Object navigation(Context mContext, Postcard postcard, int requestCode, NavigationCallback callback) {
        return _ARouter.getInstance().navigation(mContext, postcard, requestCode, callback);
    }
654892
public void transact(final DbCodeTx code) {
    if (io.vertx.core.Context.isOnEventLoopThread()) {
      throw new DatabaseException("Do not call transact() from event loop threads; use transactAsync() instead");
    }

    Transaction tx = new TransactionImpl();
    tx.setRollbackOnError(true);
    tx.setRollbackOnly(false);
    boolean complete = false;
    try {
      code.run(this, tx);
      complete = true;
    } catch (ThreadDeath | DatabaseException t) {
      throw t;
    } catch (Throwable t) {
      throw new DatabaseException("Error during transaction", t);
    } finally {
      if ((!complete && tx.isRollbackOnError()) || tx.isRollbackOnly()) {
        rollbackAndClose();
      } else {
        commitAndClose();
      }
    }
  }
1057325
public void init( String baseUrl, XRPCBatchRequestSender callback )
	{
		this.url = baseUrl + "&locale=" + LocaleInfo.getCurrentLocale().getLocaleName();
		this.callback = callback;
	}
1291016
function (pageRequest, cb) {
            var pageId = pageRequest.pageId;
            var forceReload = pageRequest.forceReload;
            if (!forceReload && pageId && pageId == this.currentPageId) {
                this.$callback(cb);
                if (this._navigationManager) {
                    this._navigationManager.update(pageRequest);
                    ariaUtilsJson.setValue(this._data, "pageInfo", pageRequest);
                }
            } else {
                this._previousPageCSS = this._currentPageCSS;
                this._currentPageCSS = [];
                this._pageProvider.loadPageDefinition(pageRequest, {
                    onsuccess : {
                        fn : this._getPageDependencies,
                        scope : this,
                        args : {
                            pageRequest : pageRequest,
                            cb : cb
                        }
                    },
                    onfailure : this._getErrorCallbackConfig([this.PAGE_NOT_AVAILABLE, pageId])
                });
            }
        }
1299672
public final void registerForActivityResult(final int requestCode) {
        executeWithRouter(new RouterRequiringFunc() {
            @Override public void execute() { router.registerForActivityResult(instanceId, requestCode); }
        });
    }
1329119
function(source, baseUrl, requestFormatter, responseFormatter) {
  const querier =  pointToQuery(baseUrl, requestFormatter, responseFormatter)(source);
  querier.subscribe = function(callback) {
    querier(0, callback)
  }
  return querier;
}
634155
public void setCode(ExprCode code) {
        mCode = code;

        mStartPos = mCode.mStartPos;
        mCurIndex = mStartPos;
    }
1308877
protected void prepareAsync(Postcard postcard) {
        if (asyncStrategy.alwaysAsync(postcard) && !postcard.isAsync()) {
            logger.debug("...Calling async() automatically by strategy: {}", asyncStrategy);
            postcard.async();
        }
    }
680878
private void initRequestFromRpcContext(CmsContainerPageRpcContext context) {

        if (context.getTemplateContext() != null) {
            getRequest().setAttribute(
                CmsTemplateContextManager.ATTR_RPC_CONTEXT_OVERRIDE,
                context.getTemplateContext());
        }
    }
1362154
private void startActivity(int requestCode, Context currentContext, Intent intent, Postcard postcard, NavigationCallback callback) {
        if (requestCode >= 0) {  // Need start for result
            if (currentContext instanceof Activity) {
                ActivityCompat.startActivityForResult((Activity) currentContext, intent, requestCode, postcard.getOptionsBundle());
            } else {
                logger.warning(Consts.TAG, "Must use [navigation(activity, ...)] to support [startActivityForResult]");
            }
        } else {
            ActivityCompat.startActivity(currentContext, intent, postcard.getOptionsBundle());
        }

        if ((-1 != postcard.getEnterAnim() && -1 != postcard.getExitAnim()) && currentContext instanceof Activity) {    // Old version.
            ((Activity) currentContext).overridePendingTransition(postcard.getEnterAnim(), postcard.getExitAnim());
        }

        if (null != callback) { // Navigation over.
            callback.onArrival(postcard);
        }
    }
461912
public void onStartup() {
        try {
            preloadCaches();
            SpringAppContext.getInstance().loadPackageContexts();  // trigger dynamic context loading
            preloadDynamicCaches();
            // implementor cache relies on kotlin from preloadDynamicCaches()
            ImplementorCache implementorCache = new ImplementorCache();
            implementorCache.loadCache();
            allCaches.put(ImplementorCache.class.getSimpleName(), implementorCache);
        }
        catch (Exception ex){
            String message = "Failed to load caches";
            logger.severeException(message, ex);
            throw new StartupException(message, ex);
        }
    }
1258866
protected Object navigation(final Context context, final Postcard postcard, final int requestCode, final NavigationCallback callback) {
        try {
            LogisticsCenter.completion(postcard);
        } catch (NoRouteFoundException ex) {
            logger.warning(Consts.TAG, ex.getMessage());

            if (debuggable()) {
                // Show friendly tips for user.
                runInMainThread(new Runnable() {
                    @Override
                    public void run() {
                        Toast.makeText(mContext, "There's no route matched!\n" +
                                " Path = [" + postcard.getPath() + "]\n" +
                                " Group = [" + postcard.getGroup() + "]", Toast.LENGTH_LONG).show();
                    }
                });
            }

            if (null != callback) {
                callback.onLost(postcard);
            } else {    // No callback for this invoke, then we use the global degrade service.
                DegradeService degradeService = ARouter.getInstance().navigation(DegradeService.class);
                if (null != degradeService) {
                    degradeService.onLost(context, postcard);
                }
            }

            return null;
        }

        if (null != callback) {
            callback.onFound(postcard);
        }

        if (!postcard.isGreenChannel()) {   // It must be run in async thread, maybe interceptor cost too mush time made ANR.
            interceptorService.doInterceptions(postcard, new InterceptorCallback() {
                /**
                 * Continue process
                 *
                 * @param postcard route meta
                 */
                @Override
                public void onContinue(Postcard postcard) {
                    _navigation(context, postcard, requestCode, callback);
                }

                /**
                 * Interrupt process, pipeline will be destory when this method called.
                 *
                 * @param exception Reson of interrupt.
                 */
                @Override
                public void onInterrupt(Throwable exception) {
                    if (null != callback) {
                        callback.onInterrupt(postcard);
                    }

                    logger.info(Consts.TAG, "Navigation failed, termination by interceptor : " + exception.getMessage());
                }
            });
        } else {
            return _navigation(context, postcard, requestCode, callback);
        }

        return null;
    }
1023738
public void start() throws ContextClientCodeException {
    synchronized (this.contextStack) {
      LOG.log(Level.FINEST, "Instantiating root context.");
      this.contextStack.push(this.launchContext.get().getRootContext());

      if (this.launchContext.get().getInitialTaskConfiguration().isPresent()) {
        LOG.log(Level.FINEST, "Launching the initial Task");
        try {
          this.contextStack.peek().startTask(this.launchContext.get().getInitialTaskConfiguration().get());
        } catch (final TaskClientCodeException e) {
          this.handleTaskException(e);
        }
      }
    }
  }
728497
public static synchronized void pushCCMContext(String key, Throwable callstack)
   {
      log.tracef("%s", new TraceEvent("CachedConnectionManager", "NONE", TraceEvent.PUSH_CCM_CONTEXT,
                                      "NONE", key, callstack != null ? toString(callstack) : ""));
   }
238823
private static void asyncMapboxDirectionsRequest() {

    // 1. Pass in all the required information to get a route.
    MapboxDirections request = MapboxDirections.builder()
      .accessToken(BuildConfig.MAPBOX_ACCESS_TOKEN)
      .origin(Point.fromLngLat(-95.6332, 29.7890))
      .destination(Point.fromLngLat(-95.3591, 29.7576))
      .profile(DirectionsCriteria.PROFILE_CYCLING)
      .steps(true)
      .build();

    // 2. Now request the route using a async call
    request.enqueueCall(new Callback<DirectionsResponse>() {
      @Override
      public void onResponse(Call<DirectionsResponse> call, Response<DirectionsResponse> response) {
        // 3. Log information from the response
        if (response.isSuccessful()) {
          System.out.printf("%nGet the street name of the first step along the route: %s",
            response.body().routes().get(0).legs().get(0).steps().get(0).name());
        }
      }

      @Override
      public void onFailure(Call<DirectionsResponse> call, Throwable throwable) {
        System.err.println(throwable);
      }
    });
  }
166059
public void execute(@Param("channelId") Long channelId, @Param("pageIndex") int pageIndex,
                        @Param("searchKey") String searchKey, Context context, Navigator nav) throws Exception {
        Channel channel = channelService.findById(channelId);
        if (channel.getStatus().isStart()) {
            nav.redirectTo(WebConstant.ERROR_FORBIDDEN_Link);
            return;
        }
        context.put("channel", channel);
        context.put("pageIndex", pageIndex);
        context.put("searchKey", searchKey);
    }
874160
@Override
    public void success(String code, Object... arguments)
        throws NullPointerException, IllegalArgumentException {
        this.store.add(Level.SUCCESS, resolveMessage(code, arguments));
    }