Package anvil.server

Examples of anvil.server.SessionContainerPreferences


 
  public SessionServer(ServerSessionContainer container, Zone zone)
  {
    _container = container;
    _zone = zone;
    SessionContainerPreferences prefs = zone.getSessionContainerPreferences();
    String allow = prefs.getPreference("allow", "").toString();
    StringTokenizer tokenizer = new StringTokenizer(allow, " \t");
    while(tokenizer.hasMoreTokens()) {
      String hostname = tokenizer.nextToken();
      try {
        _allow.add(InetAddress.getByName(hostname));
      } catch (UnknownHostException e) {
        log().info("Unknown host '"+hostname+"' in 'allow' attribute");
      }
    }
    _port = prefs.getIntPreference("port", 9000);
    _pool.setMaxThreads(prefs.getIntPreference("maxthreads", 10));
    _pool.setMaxTasks(prefs.getIntPreference("maxtasks", 30));
  }
View Full Code Here



  public void initialize(Zone zone)
  {
    super.initialize(zone);
    SessionContainerPreferences prefs = zone.getSessionContainerPreferences();
    String hostname = prefs.getPreference("host", "localhost").toString();
    try {
      _address = InetAddress.getByName(hostname);
    } catch (UnknownHostException e) {
       throw new ConfigurationError("Unknown host '"+hostname+"'");
    }
    _port = prefs.getIntPreference("port", 9000);
    _cleaner = new SessionCleaner("Cleaner-"+_port, prefs.getCheckoutFrequency());
    _cleaner.setDaemon(true);
    _cleaner.start();
    _zone.log().info("SessionContainer " + this + " initialized");
  }
View Full Code Here

TOP

Related Classes of anvil.server.SessionContainerPreferences

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.