Put public workstation into the flow if request parameter present.

@param context the context
191943
public static void putPublicWorkstationToFlowIfRequestParameterPresent(final RequestContext context) {
        if (StringUtils.isNotBlank(context.getExternalContext().getRequestParameterMap().get(PUBLIC_WORKSTATION_ATTRIBUTE))) {
            context.getFlowScope().put(PUBLIC_WORKSTATION_ATTRIBUTE, Boolean.TRUE);
        }
    }
150973
@SuppressWarnings("unchecked")
    void initThreadContext(WSContextService contextSvc, Map<String, String> execProps) {
        threadContext = contextSvc.captureThreadContext(execProps);
    }
254030
public static void putUnauthorizedRedirectUrlIntoFlowScope(final RequestContext context, final URI url) {
        context.getFlowScope().put(PARAMETER_UNAUTHORIZED_REDIRECT_URL, url);
    }
881125
public static void beginContext(ControlContainerContext context)
    {
        Stack<ControlContainerContext> contextStack = _threadContexts.get();
        if (contextStack == null)
        {
            contextStack = new Stack<ControlContainerContext>();
            _threadContexts.set(contextStack);
        }
        contextStack.push(context);
    }
419641
public static void putAuthenticationResult(final AuthenticationResult authenticationResult, final RequestContext context) {
        context.getConversationScope().put(PARAMETER_AUTHENTICATION_RESULT, authenticationResult);
    }
661654
protected void saveRequestedUrl(final C context, final List<Client> currentClients, AjaxRequestResolver ajaxRequestResolver) {
        if (ajaxRequestResolver == null || !ajaxRequestResolver.isAjax(context)) {
            savedRequestHandler.save(context);
        }
    }
558836
private void invokeInstanceRegistrationRequest(final Context context) {

        AuthorizationRequestManager.RequestOptions options = new AuthorizationRequestManager.RequestOptions();

        options.parameters = createRegistrationParams();
        options.headers = createRegistrationHeaders();
        options.requestMethod = Request.POST;

        InnerAuthorizationResponseListener listener = new InnerAuthorizationResponseListener() {
            @Override
            public void handleAuthorizationSuccessResponse(Response response) throws Exception {
                saveCertificateFromResponse(response);
                invokeAuthorizationRequest(context);
            }
        };

        authorizationRequestSend(null, "clients/instance", options, listener);
    }
183684
public void initialize(Context context) {
    if (!isInitialized) {
      initializePicasso(context);
      initializeData(context);
      isInitialized = true;
    }
  }
1371573
public static void pushContext() {
        RpcInternalContext context = LOCAL.get();
        if (context != null) {
            Deque<RpcInternalContext> deque = DEQUE_LOCAL.get();
            if (deque == null) {
                deque = new ArrayDeque<RpcInternalContext>();
                DEQUE_LOCAL.set(deque);
            }
            deque.push(context);
            LOCAL.set(null);
        }
    }
1008150
protected void beforeSend(RpcInternalContext context, SofaRequest request) {
        currentRequests.incrementAndGet();
        context.getStopWatch().tick().read();
        context.setLocalAddress(localAddress());
        if (EventBus.isEnable(ClientBeforeSendEvent.class)) {
            EventBus.post(new ClientBeforeSendEvent(request));
        }
    }
1250206
public void setContext(Context context) {
        log = Log.instance(context);
        options = Options.instance(context);
        classLoaderClass = options.get("procloader");

        // Avoid initializing Lint
        boolean warn = options.isLintSet("path");
        locations.update(log, warn, FSInfo.instance(context));

        // Setting this option is an indication that close() should defer actually closing
        // the file manager until after a specified period of inactivity.
        // This is to accomodate clients which save references to Symbols created for use
        // within doclets or annotation processors, and which then attempt to use those
        // references after the tool exits, having closed any internally managed file manager.
        // Ideally, such clients should run the tool via the javax.tools API, providing their
        // own file manager, which can be closed by the client when all use of that file
        // manager is complete.
        // If the option has a numeric value, it will be interpreted as the duration,
        // in seconds, of the period of inactivity to wait for, before the file manager
        // is actually closed.
        // See also deferredClose().
        String s = options.get("fileManager.deferClose");
        if (s != null) {
            try {
                deferredCloseTimeout = (int) (Float.parseFloat(s) * 1000);
            } catch (NumberFormatException e) {
                deferredCloseTimeout = 60 * 1000;  // default: one minute, in millis
            }
        }
    }
274288
public void onResume(final Context context) {
        new Handler().post(new Runnable() {
            @Override
            public void run() {
                checkLocaleChange(context);
                checkAfterLocaleChanging();
            }
        });
    }
1138953
@Override
	public void setup(TaskContext<CrossFunction<T1, T2, OT>, OT> context) {
		this.taskContext = context;
		this.running = true;
	}
1135778
protected boolean addWork(final ForkJoinContext<?> context) {
	requireNotStopped(this);

	final boolean result = workQueue.addWaitingWork(context);
	if (result) {
	    addWorkerIfNeeded();
	}

	return result;
    }
772746
private void handleUpdate(final NetworkContext context) {
    log.debug(String.format("%s - Network configuration updated in cluster: %s", NetworkManager.this, cluster.address()));
    log.debug(String.format("%s - Scheduling network update task", NetworkManager.this));
    tasks.runTask(new Handler<Task>() {
      @Override
      public void handle(final Task task) {
        // Any time the network is being reconfigured, unready the network.
        // This will cause components to pause during the reconfiguration.
        unready(new Handler<AsyncResult<Void>>() {
          @Override
          public void handle(AsyncResult<Void> result) {
            if (result.failed()) {
              log.error(result.cause());
              task.complete();
            } else {
              if (currentContext != null) {
                final NetworkContext runningContext = currentContext;
                currentContext = context;
                

                // We have to update all instance contexts before deploying
                // any new components in order to ensure connections are
                // available for startup.
                log.info(String.format("%s - Updating network in cluster: %s", NetworkManager.this, address));
                log.debug(String.format("%s - Network:%n%s", NetworkManager.this, currentContext.toString(true)));
                updateNetwork(currentContext, new Handler<AsyncResult<Void>>() {
                  @Override
                  public void handle(AsyncResult<Void> result) {
                    if (result.failed()) {
                      log.warn(result.cause());
                      task.complete();
                    } else {
                      undeployRemovedComponents(currentContext, runningContext, new Handler<AsyncResult<Void>>() {
                        @Override
                        public void handle(AsyncResult<Void> result) {
                          if (result.failed()) {
                            log.warn(result.cause());
                            task.complete();
                          } else {
                            deployAddedComponents(currentContext, runningContext, new Handler<AsyncResult<Void>>() {
                              @Override
                              public void handle(AsyncResult<Void> result) {
                                task.complete();
                                if (result.failed()) {
                                  log.warn(result.cause());
                                }
                              }
                            });
                          }
                        }
                      });
                    }
                  }
                });
              }
              else {
                // Just deploy the entire network if it wasn't already deployed.
                currentContext = context;
                log.info(String.format("%s - Deploying network in cluster: %s", NetworkManager.this, address));
                log.debug(String.format("%s - Network:%n%s", NetworkManager.this, currentContext.toString(true)));
                deployNetwork(context, new Handler<AsyncResult<NetworkContext>>() {
                  @Override
                  public void handle(AsyncResult<NetworkContext> result) {
                    task.complete();
                    if (result.failed()) {
                      log.warn(result.cause());
                    } else {
                      log.info(String.format("%s - Successfully deployed network", NetworkManager.this));
                    }
                  }
                });
              }
            }
          }
        });
      }
    });
  }
1104473
protected static void put(String resource, RequestParams params,
            ResponseHandler responseHandler) {
        WonderPushRestClient.put(resource, params, responseHandler);
    }
992489
public static synchronized void sdkInitialize(Context context) {
        if (sdkInitialized == true) {
          return;
        }
        BoltsMeasurementEventListener.getInstance(context.getApplicationContext());
        sdkInitialized = true;
    }