Examples of ServerConfig


Examples of com.dianping.cat.configuration.server.entity.ServerConfig

  public void initialize(File configFile) throws Exception {
    if (configFile != null && configFile.canRead()) {
      m_logger.info(String.format("Loading configuration file(%s) ...", configFile.getCanonicalPath()));

      String xml = Files.forIO().readFrom(configFile, "utf-8");
      ServerConfig config = DefaultSaxParser.parse(xml);

      // do validation
      config.accept(new ServerConfigValidator());
      m_config = config;
    } else {
      if (configFile != null) {
        m_logger.warn(String.format("Configuration file(%s) not found, IGNORED.", configFile.getCanonicalPath()));
      }

      ServerConfig config = new ServerConfig();

      // do validation
      config.accept(new ServerConfigValidator());
      m_config = config;
    }

    if (m_config.isLocalMode()) {
      m_logger.warn("CAT server is running in LOCAL mode! No HDFS or MySQL will be accessed!");
View Full Code Here

Examples of com.google.greaze.webservice.client.ServerConfig

      GreazeFilterChain filters) {
    this(buildInjector(responseBuilder, serverGsonBuilder, urlPaths, queryPath, filters), urlPaths);
  }

  public ResourceQueryClientFake(Injector injector, ResourceUrlPaths urlPaths) {
    super(new ServerConfig(urlPaths.getResourceBaseUrl()));
    networkSwitcher = new NetworkSwitcherRest(injector, urlPaths);
  }
View Full Code Here

Examples of com.iplanet.ias.installer.core.ServerConfig

        throws DomainException
    {
        // validate(domainConfig);

        // construct the ServerConfig obj, since validation succeeded
        ServerConfig sc = createServerConfig(domainConfig);
       
        // create the actual domain directory, under the domain root
        File domainDir = new File(sc.domainRoot);
        domainDir.mkdirs();
View Full Code Here

Examples of com.netflix.suro.input.thrift.ServerConfig

    @Test
    public void test() throws TTransportException, IOException {
        InputManager inputManager = mock(InputManager.class);
        doReturn(mock(SuroInput.class)).when(inputManager).getInput("thrift");
        HealthCheck healthCheck = new HealthCheck(new ServerConfig() {
            @Override
            public int getPort() {
                return suroServer.getServerPort();
            }
        }, inputManager);
View Full Code Here

Examples of com.sun.appserv.management.config.ServerConfig

        try{
            if(configName != null){
                Vector targets = getReferencedInstances(configName);
                for(int i=0; i<targets.size(); i++){
                    HashMap oneRow = new HashMap();
                    ServerConfig servConfig = (ServerConfig)targets.get(i);
                    String name = servConfig.getName();
                    oneRow.put("targetname", name);
                    oneRow.put("image", AMXUtil.getStatusForDisplay(
                                AMXUtil.getJ2EEDomain().getJ2EEServerMap().get(name), false));
                    if(servConfig instanceof StandaloneServerConfig){
                        oneRow.put("isCluster", false);
View Full Code Here

Examples of com.taobao.gecko.service.config.ServerConfig

    }


    @Test
    public void testGetStats() throws Exception {
        ServerConfig serverConfig = new ServerConfig();
        serverConfig.setWireFormatType(new MetamorphosisWireFormatType());
        serverConfig.setPort(8199);
        RemotingServer server = RemotingFactory.bind(serverConfig);
        try {
            server.registerProcessor(StatsCommand.class, new RequestProcessor<StatsCommand>() {

                @Override
View Full Code Here

Examples of helma.main.ServerConfig

        try {
            File dbHome = new File(dbDir);
            File appHome = new File(appDir);
            File hopHome = new File(hopDir);

            ServerConfig config = new ServerConfig();
            config.setHomeDir(hopHome);
            Server server = new Server(config);
            server.init();

            app = new Application(appName, server, repositories, appHome, dbHome);
            app.init();
View Full Code Here

Examples of info.caiiiycuk.stail.impl.ServerConfig

  @Test
  public void sampleServerConfig() throws ScriptException {
    InputStream resourceStream = ConfigTest.class.getResourceAsStream("config.js");
    Configuration configuration = new Configuration(resourceStream);
   
    ServerConfig serverConfig = configuration.getServerConfig();
   
    Assert.assertNotNull(serverConfig);
    Assert.assertEquals(8080, serverConfig.getPort());
   
    try {
      resourceStream.close();
    } catch (IOException e) {
      throw new RuntimeException(e);
View Full Code Here

Examples of namespaces.ifaces.ServerConfig

    }

    public static void main( final String[] args ) throws Exception
    {
        final Document parsedDocument = Main.getDocument( "/server.xml" );
        final ServerConfig config = XML2Java.bind( parsedDocument, ServerConfig.class );

        final ModuleConfig[] modules = config.getRegisteredModules();

        System.out.println();
        System.out.println( "Registered server modules: " );
        System.out.println();
        for ( int i = 0; i < modules.length; i++ )
View Full Code Here

Examples of net.sf.atjc.config.ServerConfig

   * @param aDestination
   * @return
   * @throws ConfigurationException
   */
  protected ServerInstance createNewInstance(Destination aDestination) throws ConfigurationException {
    ServerConfig config = configManager.getServerConfig(aDestination.getServerId());
    if (config == null) {
      // no such server, try default config?
    }
    Class<? extends ServerInstance> instanceClass = getInstanceClass(config);
    ServerInstance instance;
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.