Examples of ObservableProperties


Examples of org.w3c.util.ObservableProperties

  if (getPageCompileProps() == null ) {
      synchronized (this.getClass()) {
    httpd s = (httpd) getServer();
    if ( s != null ) {
        // Register the property sheet if not done yet:
        ObservableProperties props = s.getProperties() ;
        s.registerPropertySet(new PageCompileProp(s));
    }
      }
  }
  File generatedClassDir =
View Full Code Here

Examples of org.w3c.util.ObservableProperties

     */

    public ObservableProperties loadPropertySpace(String id, InputStream in)
  throws IOException
    {
  ObservableProperties p = (ObservableProperties) propspace.get(id);
  if ( p == null ) {
      p = new ObservableProperties(globprops);
      propspace.put(id, p);
  }
  p.load(in);
  return p;
    }
View Full Code Here

Examples of org.w3c.util.ObservableProperties

    public ObservableProperties loadPropertySpace(String id)
  throws IOException, FileNotFoundException
    {
  File                 file = new File(configdir, id+".props");
  ObservableProperties p    = null;
  p = loadPropertySpace(id, (new BufferedInputStream
           (new FileInputStream(file))));
  p.put(org.w3c.jigsaw.http.httpd.PROPS_P, file.getAbsolutePath());
  return p;
    }
View Full Code Here

Examples of org.w3c.util.ObservableProperties

     * @exception ServerHandlerInitException thrown if initialization fails
     */
    public void initializeProperties()
        throws ServerHandlerInitException
    {
        ObservableProperties props = daemon.getProperties();
        // default to well-known factory if applicable       
        if (props.getBoolean(SSLProperties.SSL_ENABLED_P, true)) {
            String factory_class = props.getString(httpd.CLIENT_FACTORY_P,
               null);
            if (null != factory_class) {
                try {
        Class factory = Class.forName(factory_class);
        ssl_enabled =
View Full Code Here

Examples of org.w3c.util.ObservableProperties

    public HttpSession getSession() {
  return getSession(true);
    }

    protected String getCookieName() {
   ObservableProperties props =
       request.getClient().getServer().getProperties();
   return props.getString(ServletProps.SERVLET_COOKIE_NAME,
        ServletProps.DEFAULT_COOKIE_NAME);
    }
View Full Code Here

Examples of org.w3c.util.ObservableProperties

    && (vias != null && vias.length > 5)) { 
    // maybe a loop, let's try to sort it out with an expensive
    // checking on IPs
    String hostaddr;
   
    ObservableProperties props = getServer().getProperties();
    hostaddr = props.getString(SocketClientFactory.BINDADDR_P,
             default_hostaddr);
    if (requrl != null) {
        InetAddress targhost;
        String reqhostaddr;
       
View Full Code Here

Examples of org.w3c.util.ObservableProperties

    && (requrl.getPort() == url.getPort())
    && (vias != null && vias.length > 5)) {
    // maybe a loop, let's try to sort it out with an expensive
    // checking on IPs
    String hostaddr = null;
    ObservableProperties props = getServer().getProperties();
    hostaddr = props.getString(SocketClientFactory.BINDADDR_P,
             default_hostaddr);
    if (requrl != null) {
        InetAddress targhost;
        String reqhostaddr;
       
View Full Code Here

Examples of org.w3c.util.ObservableProperties

   return props.getString(ServletProps.SERVLET_COOKIE_NAME,
        ServletProps.DEFAULT_COOKIE_NAME);
    }

    protected Cookie createCookie() {
  ObservableProperties props =
      request.getClient().getServer().getProperties();
  String name     = props.getString(ServletProps.SERVLET_COOKIE_NAME,
            ServletProps.DEFAULT_COOKIE_NAME);
  String path     = props.getString(ServletProps.SERVLET_COOKIE_PATH,
            "/");
  String domain   = props.getString(ServletProps.SERVLET_COOKIE_DOMAIN,
            null);
  String comment  = props.getString(ServletProps.SERVLET_COOKIE_COMMENT,
            null);
  int maxage      = props.getInteger(ServletProps.SERVLET_COOKIE_MAXAGE,
             -1);
  boolean secure  = props.getBoolean(ServletProps.SERVLET_COOKIE_SECURE,
             isSecure());

  Cookie cookie = new Cookie(name, null);
  cookie.setPath(path);
  cookie.setMaxAge(maxage);
View Full Code Here

Examples of org.w3c.util.ObservableProperties

      timer.stopEventManager() ;
      System.out.println (getIdentifier()+": " + getURL() + " done.") ;
      System.out.flush() ;
  // Keep the data neede to reinit (in case needed)
      File init_propfile = props.getFile(PROPS_P, null);
      ObservableProperties init_props = props ;
      String init_identifier = identifier ;
      // Release pointed data:
      identifier = null ;
      manager    = null ;
      factory    = null ;
View Full Code Here

Examples of org.w3c.util.ObservableProperties

    // System.out.println ("unknown option: ["+args[i]+"]") ;
    // System.exit (1) ;
      }
  }
  // Get the properties for this server:
  ObservableProperties props = null;
  props = new ObservableProperties(System.getProperties()) ;
  // Get the root and configuration directories:
  File root   = ((cmdroot == null)
           ? new File(props.getProperty("user.dir", null))
           : new File(cmdroot));
  File config = new File(root, cmdconfig);
  // Locate the property file:
  if (cmdprop == null) {
      // Try to guess it, cause it is really required:
      File guess = new File (config, cmdid+".props");
      if ( ! guess.exists() )
    // A hack for smooth upgrade from 1.0alpha3 to greater:
    guess = new File(config, "httpd.props");
      cmdprop = guess.getAbsolutePath() ;
  }
  if ( cmdprop != null ) {
      System.out.println ("loading properties from: " + cmdprop) ;
      try {
    File propfile = new File(cmdprop) ;
    props.load(new FileInputStream(propfile)) ;
    props.put (PROPS_P, propfile.getAbsolutePath()) ;
      } catch (FileNotFoundException ex) {
    System.out.println ("Unable to load properties: "+cmdprop);
    System.out.println ("\t"+ex.getMessage()) ;
    System.exit (1) ;
      } catch (IOException ex) {
    System.out.println ("Unable to load properties: "+cmdprop);
    System.out.println ("\t"+ex.getMessage()) ;
    System.exit (1) ;
      }
      System.setProperties (props) ;
  }
  // Check for an upgrade:
  int configvers = props.getInteger(httpd.VERSCOUNT_P, 1);
  if (configvers < httpd.verscount) {
      System.err.println("+ Jigsaw needs upgrade from internal version "+
             configvers+
             " to " + httpd.verscount);
      if ( noupgrade ) {
    System.err.println("+ Jigsaw cannot run in that version.");
    System.exit(1);
      }
      // upgrade(configvers, httpd.verscount, args);
      return;
  }
  // Override properties with our command line options:
  if ( cmdport != null )
      props.put (PORT_P, cmdport.toString()) ;
  if ( cmdhost != null )
      props.put (HOST_P, cmdhost) ;
  if ( cmdroot != null )
      props.put (ROOT_P, root.getAbsolutePath()) ;
  if ( cmdconfig != null )
      props.put(CONFIG_P, config.getAbsolutePath());
  if ( cmdspace != null )
      props.put (SPACE_P, cmdspace) ;
  if ( cmdtrace != null ) {
      props.put (TRACE_P, "true") ;
      props.put (CLIENT_DEBUG_P, "true") ;
  }
  if (maxstores != null)
      props.put (MAX_LOADED_STORE_P, maxstores);

  // Install security manager if needed:
  if (Boolean.getBoolean(USE_SM_P)) {
      SecurityManager sm = new httpdSecurityManager() ;
      System.setSecurityManager (sm) ;
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.