Package anvil.server

Examples of anvil.server.Server


    File file = new File(filename);
    filename = file.getAbsolutePath();

    try {
   
      Server server;

      String configFile = System.getProperty("anvil.configFile");
      if (configFile != null) {
        ConfigReader reader = new ConfigReader(null, new File(configFile));
        server = reader.parse();
      } else {
        server = new Server(null);
        CompilerPreferences compiler = new CompilerPreferences(server);
        compiler.setUseTimestamp(false);
        compiler.setStoreImages(false);
        compiler.setClassPath("/var/tmp/");
        server.configure(compiler);
      }
      server.setShouldInvalidate(false);
      server.setContainer("file:/");
      if (namespace != null) {
        server.setNamespace(namespace);
      }
      int severity = verbose ? anvil.Log.DEBUG : anvil.Log.ERROR;
      anvil.Log.log().setSeverity(severity);
      LoggingPreferences logprefs = new LoggingPreferences(server);
      logprefs.setLevel(severity);
      server.configure(logprefs);
      server.start();

      Zone zone = server.resolveZone(filename);
      Address address = zone.resolve(filename);
      Module script = server.getCache().load(address).getModule();
      Product product = new Product(address, System.out, script);
      Array arguments = new Array();
      while(index < length) {
        arguments.append(new AnyString(args[index++]));
      }
View Full Code Here


  /// @method getServer
  /// Returns the server where this object is located.
  /// @synopsis Configurable getServer()
  public Any m_getServer()
  {
    Server server;
    if (_conf instanceof Zone) {
      server = ((Zone)_conf).getServer();
    } else {
      server = _conf.getParent().getServer();
    }
View Full Code Here

TOP

Related Classes of anvil.server.Server

Copyright © 2018 www.massapicom. 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.