Examples of Context


Examples of ninja.Context

    @Override
    public void rejectedExecution(Runnable runnable, ThreadPoolExecutor executor) {
        
        
        YodaAsyncTask task = (YodaAsyncTask) runnable;
        Context context = task.getContext();
        Result result = yodaResults.getResponderRejectedExecutionResult(context);
       
       
        ninja.renderErrorResultAndCatchAndLogExceptions(result, context);
       
View Full Code Here

Examples of nl.nuggit.swaf.model.Context

    private ContextStore contextStore;
    @Autowired
    private InteractionFactory interactionFactory;

    public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        Context context = getContext(request);
        Interaction interaction = interactionFactory.create(context, request.getPathInfo());
        if (interaction != null) {
            ViewData view = interaction.execute(request, response);
            forwardToView(request, response, view);
        }
View Full Code Here

Examples of opennlp.maxent.Context

    TObjectIntIterator iterator = map.iterator();
    while(iterator.hasNext()) {
      iterator.advance();
      String predName = (String)iterator.key();
      int index = map.get(predName);
      Context context = params[index];
      boolean goodPredName = true;
      if(featuresToRemove != null && featuresToRemove.contains(predName)) goodPredName = false;
      for(String prefix : prefixesToRemove) {
        if(predName.startsWith(prefix)) goodPredName = false;
      }
View Full Code Here

Examples of opennlp.model.Context

    int[] activeOutcomes;
    double[] activeParameters;
    double value = 1;
    for (int ci = 0; ci < context.length; ci++) {
      if (context[ci] >= 0) {
        Context predParams = params[context[ci]];
        activeOutcomes = predParams.getOutcomes();
        activeParameters = predParams.getParameters();
        if (values != null) {
          value = values[ci];
        }
        for (int ai = 0; ai < activeOutcomes.length; ai++) {
          int oid = activeOutcomes[ai];
View Full Code Here

Examples of opennlp.tools.ml.model.Context

    int[] activeOutcomes;
    double[] activeParameters;
    double value = 1;
    for (int ci = 0; ci < context.length; ci++) {
      if (context[ci] >= 0) {
        Context predParams = params[context[ci]];
        activeOutcomes = predParams.getOutcomes();
        activeParameters = predParams.getParameters();
        if (values != null) {
          value = values[ci];
        }
        for (int ai = 0; ai < activeOutcomes.length; ai++) {
          int oid = activeOutcomes[ai];
View Full Code Here

Examples of org.apache.abdera.i18n.templates.Context

      context.getContextPath() + route.expand(getContext(param)) : null;
  }
 
  @SuppressWarnings("unchecked")
  private Context getContext(Object param) {
    Context context = new EmptyContext();
    if (param != null) {
      if (param instanceof Map) {
        context = new HashMapContext(cleanMapCtx(param), true);
      } else if (param instanceof Context) {
        context = (Context)param;
View Full Code Here

Examples of org.apache.avalon.framework.context.Context

        LogKitLoggerManager manager = new LogKitLoggerManager(null, hier, null, null);

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        try {
            Configuration c = builder.buildFromFile(cfg);
            Context ctx = new DefaultContext();
            manager.contextualize(ctx);
            manager.configure(c);
        } catch (IllegalArgumentException e) {
            // This happens if the default log-target id-ref specifies a non-existent target
            System.out.println("Error processing logging config " + cfg);
View Full Code Here

Examples of org.apache.cassandra.concurrent.Context

      DebuggableThreadPoolExecutor es = (DebuggableThreadPoolExecutor)MessagingService.getWriteExecutor();
        logger_.debug( "Message Serialization Task: " + (es.getTaskCount() - es.getCompletedTaskCount()) );
        /* END DEBUG */
       
        /* Adding the message to be serialized in the TLS. For accessing in the afterExecute() */
        Context ctx = new Context();
        ctx.put(this.getClass().getName(), message_);
        ThreadLocalContext.put(ctx);
       
        TcpConnection connection = null;
        try
        {
View Full Code Here

Examples of org.apache.catalina.Context

        }
        return null;
    }

    public LogDestination getLogDestination(String logType, String webapp, boolean context, boolean root, String logName, String logIndex) {
        Context ctx = null;
        Application application = null;
        if (webapp != null) {
            ctx = getContainerWrapper().getTomcatContainer().findContext(webapp);
            if (ctx != null) {
                application = ApplicationUtils.getApplication(ctx);
            }
        }

        if ("stdout".equals(logType) && logName != null) {
            return getStdoutLogDestination(logName);
        } else if ("catalina".equals(logType) && ctx != null) {
            return getCatalinaLogDestination(ctx, application);
        } else if (logIndex != null
                && ("jdk".equals(logType)
                || "log4j".equals(logType)
                || "logback".equals(logType))) {
            if (context && ctx != null) {
                return getCommonsLogDestination(ctx, application, logIndex);
            }
            ClassLoader cl;
            ClassLoader prevCl = null;
            if (ctx != null) {
                cl = ctx.getLoader().getClassLoader();
                prevCl = ClassUtils.overrideThreadContextClassLoader(cl);
            } else {
                cl = Thread.currentThread().getContextClassLoader().getParent();
            }
            try {
View Full Code Here

Examples of org.apache.click.Context

     *
     * @see Page#onInit()
     */
    public void onInit() {
        addModel("mode", getMode());
        Context context = getContext();
        if (getError() != null) {
            ErrorReport errorReport =
                new ErrorReport(error,
                                getPageClass(),
                                false,
                                context.getRequest(),
                                context.getServletContext());

            addModel("errorReport", errorReport);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.