Examples of AgentConfiguration


Examples of com.adito.agent.client.AgentConfiguration

  private Agent agent;
  private AgentConfiguration configuration;

  public StandaloneAgent() throws Exception {
   
    configuration = new AgentConfiguration()
    configuration.setGUIClass("com.adito.agent.client.standalone.StandaloneGUI");
    agent = new Agent(configuration);
    agent.init();
   
  }
View Full Code Here

Examples of com.volantis.mcs.runtime.configuration.AgentConfiguration

       
        TestXmlConfigurationBuilder configBuilder =
                new TestXmlConfigurationBuilder(doc);
        MarinerConfiguration config = configBuilder.buildConfiguration();
        assertNotNull(config);
        AgentConfiguration agent = config.getAgent();
        if (value != null) {
            assertNotNull("agentConfiguration", agent);
            // enabled attribute is tested via the EnabledDigester test case
            assertEquals(value.port, agent.getPort());
            assertEquals(value.password, agent.getPassword());
        } else {
            assertNull("agentConfiguration", agent);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.runtime.configuration.AgentConfiguration

        // @todo make this part of the internal API and move to MPS
        configBuilder.addApplicationPluginRuleSet(new MpsPluginRuleSet());
        mariner = configBuilder.buildConfiguration();

        // Create references to all the simple sub-objects
        AgentConfiguration agent = mariner.getAgent();
        AppServerConfiguration appServer = mariner.getAppServer();
        DebugConfiguration debug = mariner.getDebug();
        ProtocolsConfiguration protocols = mariner.getProtocols();

        // Build the map of element attribute values just the same as the
        // previous XMLHandler based Config did for backwards compatibility.
        AttributeMap attrs;
        if (mariner != null) {

            attrs = makeAttrs(Volantis.CONFIG_PAGEMESSAGES_ELEMENT);
            attrs.put("heading", mariner.getPageMessageHeading());

            attrs = makeAttrs(Volantis.CONFIG_SCRIPTS_ELEMENT);
            attrs.put("base", mariner.getScriptsBase());

            attrs = makeAttrs(Volantis.CONFIG_MODESETS_ELEMENT);
            attrs.put("base", mariner.getModeSetsBase());

            attrs = makeAttrs(Volantis.CONFIG_CHARTIMAGES_ELEMENT);
            attrs.put("base", mariner.getChartImagesBase());

            attrs = makeAttrs(Volantis.PLUGINS_ELEMENT);
            attrs.put("url-rewriter", mariner.getUrlRewriterPluginClass());
            attrs.put("asset-url-rewriter",
                      mariner.getAssetURLRewriterPluginClass());
            attrs.put("asset-transcoder",
                      mariner.getAssetTranscoderPluginClass());

            attrs = makeAttrs(Volantis.CONFIG_PAGE_PACKAGING_MIME);
            attrs.put("enabled", mariner.getPagePackagingMimeEnabled());

            attrs = makeAttrs(Volantis.CONFIG_MAP_COOKIES_ELEMENT);
            attrs.put("enabled", mariner.getSessionProxyCookieMappingEnabled());

        }

        if (debug != null) {
            attrs = makeAttrs(Volantis.CONFIG_DEBUG_ELEMENT);
            attrs.put("logPageOutput", debug.getLogPageOutput());
            attrs.put("comments", debug.getComments());
        }

        if (protocols != null) {
            attrs = makeAttrs(Volantis.CONFIG_PROTOCOLS_ELEMENT);
            attrs.put("preferred-output-format",
                    protocols.getPreferredOutputFormat());
        }


        if (agent != null) {
            attrs = makeAttrs(Volantis.CONFIG_AGENT_ELEMENT);
            attrs.put("enabled", "true"); // corresponds to Enabled.
            attrs.put("password", agent.getPassword());
            attrs.put("port", agent.getPort());
        }

        if (appServer != null) {
            attrs = makeAttrs(Volantis.CONFIG_WEBAPP_ELEMENT);
            attrs.put("base-url", appServer.getBaseUrl());
View Full Code Here

Examples of org.apache.flume.conf.FlumeConfiguration.AgentConfiguration

    es.awaitEvent();
    es.reset();

    FlumeConfiguration fc = cp.getFlumeConfiguration();
    Assert.assertTrue(fc.getConfigurationErrors().isEmpty());
    AgentConfiguration ac = fc.getConfigurationFor(AGENT_NAME);
    Assert.assertNull(ac);

    addData();
    es.awaitEvent();
    es.reset();
View Full Code Here

Examples of org.apache.flume.conf.FlumeConfiguration.AgentConfiguration

  protected abstract FlumeConfiguration getFlumeConfiguration();

  public MaterializedConfiguration getConfiguration() {
    MaterializedConfiguration conf = new SimpleMaterializedConfiguration();
    FlumeConfiguration fconfig = getFlumeConfiguration();
    AgentConfiguration agentConf = fconfig.getConfigurationFor(getAgentName());
    if (agentConf != null) {
      Map<String, ChannelComponent> channelComponentMap = Maps.newHashMap();
      Map<String, SourceRunner> sourceRunnerMap = Maps.newHashMap();
      Map<String, SinkRunner> sinkRunnerMap = Maps.newHashMap();
      try {
View Full Code Here

Examples of org.apache.flume.conf.FlumeConfiguration.AgentConfiguration

  protected abstract FlumeConfiguration getFlumeConfiguration();

  public MaterializedConfiguration getConfiguration() {
    MaterializedConfiguration conf = new SimpleMaterializedConfiguration();
    FlumeConfiguration fconfig = getFlumeConfiguration();
    AgentConfiguration agentConf = fconfig.getConfigurationFor(getAgentName());
    if (agentConf != null) {
      Map<String, ChannelComponent> channelComponentMap = Maps.newHashMap();
      Map<String, SourceRunner> sourceRunnerMap = Maps.newHashMap();
      Map<String, SinkRunner> sinkRunnerMap = Maps.newHashMap();
      try {
View Full Code Here

Examples of org.apache.flume.conf.FlumeConfiguration.AgentConfiguration

    Collections.sort(expected);
    Collections.sort(actual);
    Assert.assertEquals(expected, actual);


    AgentConfiguration agentConfiguration =
        configuration.getConfigurationFor("host1");
    Assert.assertNotNull(agentConfiguration);


    LOGGER.info(agentConfiguration.getPrevalidationConfig());
    LOGGER.info(agentConfiguration.getPostvalidationConfig());


    Set<String> sources = Sets.newHashSet("source1");
    Set<String> sinks = Sets.newHashSet("sink1");
    Set<String> channels = Sets.newHashSet("channel1");

    Assert.assertEquals(sources, agentConfiguration.getSourceSet());
    Assert.assertEquals(sinks, agentConfiguration.getSinkSet());
    Assert.assertEquals(channels, agentConfiguration.getChannelSet());
  }
View Full Code Here

Examples of org.apache.flume.conf.FlumeConfiguration.AgentConfiguration

    properties.put("agent1.sinks", "sink0");
    properties.put("agent1.sinks.sink0.type", "null");
    properties.put("agent1.sinks.sink0.channel", "ch0");

    FlumeConfiguration conf = new FlumeConfiguration(properties);
    AgentConfiguration agentConfiguration = conf.getConfigurationFor("agent1");
    Assert.assertEquals(String.valueOf(agentConfiguration.getSourceSet()), 1,
        agentConfiguration.getSourceSet().size());
    Assert.assertEquals(String.valueOf(agentConfiguration.getChannelSet()), 1,
        agentConfiguration.getChannelSet().size());
    Assert.assertEquals(String.valueOf(agentConfiguration.getSinkSet()), 1,
        agentConfiguration.getSinkSet().size());
    Assert.assertTrue(agentConfiguration.getSourceSet().contains("src0"));
    Assert.assertTrue(agentConfiguration.getChannelSet().contains("ch0"));
    Assert.assertTrue(agentConfiguration.getSinkSet().contains("sink0"));
  }
View Full Code Here

Examples of org.apache.flume.conf.FlumeConfiguration.AgentConfiguration

      properties.load(reader);
      // If there is an old configuration, shut it down.

      NodeConfiguration conf = new SimpleNodeConfiguration();
      FlumeConfiguration fconfig = new FlumeConfiguration(properties);
      AgentConfiguration agentConf = fconfig.getConfigurationFor(getNodeName());

      if (agentConf != null) {
        getConfigurationAware().stopAllComponents();

        loadChannels(agentConf, conf);
View Full Code Here

Examples of org.apache.flume.conf.properties.FlumeConfiguration.AgentConfiguration

      Properties properties = new Properties();
      properties.load(reader);

      NodeConfiguration conf = new SimpleNodeConfiguration();
      FlumeConfiguration fconfig = new FlumeConfiguration(properties);
      AgentConfiguration agentConf = fconfig.getConfigurationFor(getNodeName());

      if (agentConf != null) {
        loadChannels(agentConf, conf);
        loadSources(agentConf, conf);
        loadSinks(agentConf, conf);
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.