Examples of Controller


Examples of org.apache.qpid.disttest.controller.Controller

        _resuResultsFileWriter = new ResultsFileWriter(outputDir);
    }

    private void runTests(ControllerJmsDelegate jmsDelegate)
    {
        Controller controller = new Controller(jmsDelegate, DistributedTestConstants.REGISTRATION_TIMEOUT, DistributedTestConstants.COMMAND_RESPONSE_TIMEOUT);

        String testConfigPath = getCliOptions().get(ControllerRunner.TEST_CONFIG_PROP);
        List<String> testConfigFiles = _configFileHelper.getTestConfigFiles(testConfigPath);
        createClientsIfNotDistributed(testConfigFiles);

        try
        {
            List<ResultsForAllTests> results = new ArrayList<ResultsForAllTests>();

            for (String testConfigFile : testConfigFiles)
            {
                final Config testConfig = buildTestConfigFrom(testConfigFile);
                controller.setConfig(testConfig);

                controller.awaitClientRegistrations();

                LOGGER.info("Running test : " + testConfigFile);
                ResultsForAllTests testResult = runTest(controller, testConfigFile);
                results.add(testResult);
            }

            _resuResultsFileWriter.writeResultsSummary(results);
        }
        catch(Exception e)
        {
            LOGGER.error("Problem running test", e);
        }
        finally
        {
            controller.stopAllRegisteredClients();
        }
    }
View Full Code Here

Examples of org.apache.struts.tiles.Controller

  protected TagHandler processDefinition(ComponentDefinition definition)
    throws JspException {
    // Declare local variable in order to not change Tag attribute values.
    String role = this.role;
    String page = this.page;
    Controller controller = null;

    try {
      controller = definition.getOrCreateController();

      // Overload definition with tag's template and role.
View Full Code Here

Examples of org.apache.torque.generator.control.Controller

     * Runs the generation.
     */
    @Override
    public void execute() throws BuildException
    {
        Controller controller = new Controller();
        List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>();

        UnitDescriptor.Packaging packaging;
        if ("jar".equals(this.packaging))
        {
            packaging = UnitDescriptor.Packaging.JAR;
        }
        else if ("directory".equals(this.packaging))
        {
            packaging = UnitDescriptor.Packaging.DIRECTORY;
        }
        else if ("classpath".equals(this.packaging))
        {
            packaging = UnitDescriptor.Packaging.CLASSPATH;
        }
        else
        {
            throw new IllegalArgumentException(
                    "Unknown packaging " + this.packaging
                        + ", must be jar, directory or classpath");
        }
        log("Packaging is " + packaging, Project.MSG_DEBUG);

        ProjectPaths defaultProjectPaths;
        if (UnitDescriptor.Packaging.JAR == packaging)
        {
            defaultProjectPaths
                    = new Maven2JarProjectPaths(projectRootDir, jarFile);
        }
        else if (UnitDescriptor.Packaging.DIRECTORY == packaging)
        {
            defaultProjectPaths
                    = new Maven2DirectoryProjectPaths(projectRootDir);
        }
        else if (UnitDescriptor.Packaging.CLASSPATH == packaging)
        {
            defaultProjectPaths
                    = new Maven2DirectoryProjectPaths(projectRootDir);
        }
        else
        {
             throw new IllegalStateException("Unknown packaging" + packaging);
        }

        CustomProjectPaths projectPaths
                = new CustomProjectPaths(defaultProjectPaths);

        if (UnitDescriptor.Packaging.CLASSPATH == packaging)
        {
            if (configPackage == null)
            {
                throw new BuildException(
                    "configPackage must be set for packaging =\"classpath\"");
            }
            projectPaths.setConfigurationPackage(configPackage);
            projectPaths.setConfigurationDir(null);
        }
        else
        {
            if (configDir != null)
            {
                projectPaths.setConfigurationDir(configDir);
                log("Setting config dir to " + configDir.toString(),
                        Project.MSG_DEBUG);
            }
        }

        if (sourceDir != null)
        {
            projectPaths.setSourceDir(sourceDir);
            log("Setting source dir to " + sourceDir.toString(),
                    Project.MSG_DEBUG);
        }

        FileSourceProvider fileSourceProvider = null;
        if (sourceIncludes != null || sourceExcludes != null)
        {
            Fileset sourceFileset
                    = new Fileset(
                            projectPaths.getDefaultSourcePath(),
                            sourceIncludes,
                            sourceExcludes);
            log("Setting source includes to " + sourceIncludes,
                    Project.MSG_DEBUG);
            log("Setting source excludes to " + sourceExcludes,
                    Project.MSG_DEBUG);
            try
            {
                fileSourceProvider = new FileSourceProvider(
                        null,
                        sourceFileset,
                        combineFiles);
            }
            catch (ConfigurationException e)
            {
                throw new BuildException(
                        "The source provider cannot be instantiated", e);
            }
        }

        if (defaultOutputDir != null)
        {
            projectPaths.setOutputDirectory(null, defaultOutputDir);
            log("Setting defaultOutputDir to "
                    + defaultOutputDir.getAbsolutePath(),
                Project.MSG_DEBUG);
        }
        if (outputDirMap != null)
        {
            for (Map.Entry<String, File> dirEntry : outputDirMap.entrySet())
            {
                projectPaths.setOutputDirectory(
                        dirEntry.getKey(),
                        dirEntry.getValue());
                log("Setting output directory with key " + dirEntry.getKey()
                        + " to "
                        + dirEntry.getValue(),
                    Project.MSG_DEBUG);
            }
        }
        log("ProjectPaths = " + projectPaths, Project.MSG_DEBUG);

        OptionsConfiguration optionConfiguration = null;
        if (!options.isEmpty())
        {
            Map<String, String> optionsMap = new HashMap<String, String>();
            for (Option option : options)
            {
                optionsMap.put(option.getKey(), option.getValue());
            }
            optionConfiguration = new MapOptionsConfiguration(optionsMap);
        }
        Loglevel convertedLoglevel = null;
        if (this.loglevel != null)
        {
            convertedLoglevel = Loglevel.getByKey(loglevel);
        }
        UnitDescriptor unitDescriptor = new UnitDescriptor(
                packaging,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideSourceProvider(fileSourceProvider);
        unitDescriptor.setOverrideOptions(optionConfiguration);
        unitDescriptor.setLoglevel(convertedLoglevel);
        unitDescriptor.setAddDebuggingInfoToOutput(addDebuggingInfoToOutput);
        unitDescriptor.setDefaultOutputEncoding(defaultOutputEncoding);
        log("unit descriptor created", Project.MSG_DEBUG);
        if (overrideConfigDir != null)
        {
            CustomProjectPaths childProjectPaths
                = new CustomProjectPaths(projectPaths);
            childProjectPaths.setConfigurationDir(overrideConfigDir);

            UnitDescriptor parentUnitDescriptor = new UnitDescriptor(
                    Packaging.DIRECTORY,
                    childProjectPaths,
                    new DefaultTorqueGeneratorPaths());
            parentUnitDescriptor.setInheritsFrom(unitDescriptor);
            parentUnitDescriptor.setOverrideSourceProvider(fileSourceProvider);
            parentUnitDescriptor.setOverrideOptions(optionConfiguration);
            parentUnitDescriptor.setLoglevel(convertedLoglevel);
            parentUnitDescriptor.setDefaultOutputEncoding(
                    defaultOutputEncoding);
            log("child unit descriptor created",Project.MSG_DEBUG);
            unitDescriptor = parentUnitDescriptor;
        }
        unitDescriptors.add(unitDescriptor);
        try
        {
            log("Generation started", Project.MSG_DEBUG);
            controller.run(unitDescriptors);
            log("Generation successful", Project.MSG_INFO);
        }
        catch (Exception e)
        {
            log("Error during generation", e, Project.MSG_ERR);
View Full Code Here

Examples of org.auraframework.system.Annotations.Controller

            return null;
        }
        builder.setControllerClass(c);
        // FIXME = "we need an md5";
        builder.setLocation(c.getCanonicalName(), -1);
        Controller ann = c.getAnnotation(Controller.class);
        if (ann == null) {
            throw new InvalidDefinitionException(String.format(
                    "@Controller annotation is required on all Controllers.  Not found on %s", descriptor),
                    builder.getLocation());
        }
        builder.setBean(ann.bean());
        try {
            builder.setActionMap(createActions(c, builder.getDescriptor(), ann.bean()));
        } catch (QuickFixException qfe) {
            builder.setParseError(qfe);
        }
        return builder;
    }
View Full Code Here

Examples of org.carrot2.core.Controller

  @Test
  public void testSimple() throws Exception {
    //<start id="crt2.simple"/>
    //... setup some documents elsewhere
    final Controller controller =
            ControllerFactory.createSimple();//<co id="crt2.controller.creation"/>
    documents = new ArrayList<Document>();
    for (int i = 0; i < titles.length; i++) {
      Document doc = new Document(titles[i], snippets[i],
              "file://foo_" + i + ".txt");
      documents.add(doc);
    }
    final ProcessingResult result = controller.process(documents,
            "red fox",
            LingoClusteringAlgorithm.class);//<co id="crt2.process"/>
    displayResults(result);//<co id="crt2.print"/>

    /*
 
View Full Code Here

Examples of org.cruxframework.crux.core.client.controller.Controller

             + "\n\t 2. Check if your controller or its members belongs to a client package."
             + "\n\t 3. Check the versions of all your modules.";
     
      throw new CruxGeneratorException(message);
    }
    Controller controllerAnnot = controllerClass.getAnnotation(Controller.class);
    if (controllerAnnot == null)
    {
      throw new CruxGeneratorException("DeviceAdaptive implementation class ["+controllerClass.getQualifiedSourceName()+"] is not a valid Controller. It must be annotated with @Controller annotation.");
    }
   
View Full Code Here

Examples of org.dago.atacom.controller.Controller

    Class<? extends Controller> clazz = this.factories.get(device.getType().toString());
    if (clazz == null) {
      throw new DagoException(I18N.format(I18NMessages.noControllerFound, device.getType()));
    }

    Controller controller;
    try {
      // Creates the controller
      controller = clazz.newInstance();

      // Initialize the controller
      controller.initialize(device);
      return controller;
    }
    catch (Exception err) {
      throw new DagoException(I18N.format(I18NMessages.failToCreateController, device.getType(), err), err);
    }
View Full Code Here

Examples of org.datastorm.controller.Controller

/**
* Show the Data Storm window and fire a sql query automatically.
*/
public void show(Connection connection, String sql) {
  try {
    IController controller = new Controller(connection);
    View view = new View(controller);
    controller.setView(view);
    controller.startUp(sql);
  }
  catch(SQLException e) {
    e.printStackTrace();
  }
}
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.extended.Controller

        super(new ControllerDMO(mods), org.dmd.mvw.tools.mvwgenerator.generated.MvwSchemaAG._Controller);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGeneratorNewest.dumpWrapper(BaseDMWGeneratorNewest.java:491)
    public Controller getModificationRecorder(){
        Controller rc = new Controller();
        rc.setControllerName(getControllerName());
        rc.setModifier(new DmcTypeModifierMV(MetaDMSAG.__modify));
        return(rc);
    }
View Full Code Here

Examples of org.eclipse.e4.xwt.javabean.Controller

import org.eclipse.e4.xwt.javabean.Controller;

public class JavaLanguageSupport implements ILanguageSupport {

  public IEventHandler createEventHandler() {
    return new Controller();
  }
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.