Package rabbit.util

Examples of rabbit.util.SProperties


    }
 
    /** setup this class for usage
     */
    public static SProperties setup () {
  config = new SProperties ();
  config.put ("bodybgcolor", "WHITE");
  config.put ("bodytext", "BLACK");
  config.put ("bodylink", "BLUE");
  config.put ("bodyalink", "RED");
  config.put ("bodyvlink", "#AA00AA");
View Full Code Here


      }
  }
    }

    private void setupCache () {
  SProperties props =
      config.getProperties (NCache.class.getName ());
  cache = new NCache<HttpHeader, HttpHeader> (getLogger (), props);
    }
View Full Code Here

    }

    /** Make sure all filters and handlers are available
     */
    private void loadClasses () {
  SProperties hProps = config.getProperties ("Handlers");
  SProperties chProps = config.getProperties ("CacheHandlers");
  handlerFactoryHandler =
      new HandlerFactoryHandler (hProps, chProps, config, getLogger ());

  String filters = config.getProperty ("Filters", "accessfilters","");
  socketAccessController =
View Full Code Here

  String args = "";
  if ((index = file.indexOf ("?")) >= 0) {
      args = file.substring (index + 1);
      file = file.substring (0, index);
  }
  SProperties htab = splitArgs (args);
   if ((index = file.indexOf ("/")) >= 0) {
      String fc = file.substring (index + 1);
      file = file.substring (0, index);
      htab.put ("argstring", fc);
  }
  String error = null;
  try {
      if (file.indexOf (".") < 0)
    file = "rabbit.meta." + file;
View Full Code Here

     *  put these values into a hashtable for easy retrival
     * @param params the CGI-querystring.
     * @return a map with type->value maps for the CGI-querystring
     */
    public SProperties splitArgs (String params) {
  SProperties htab = new SProperties ();
  StringTokenizer st = new StringTokenizer (params, "=&", true);
  String key = null;
  while (st.hasMoreTokens ()) {
      String next = st.nextToken ();
      if (next.equals ("=")) {
    // nah..
      } else if (next.equals ("&")) {
    if (key != null) {
        htab.put (key, "");
        key = null;
    }
      } else if (key == null) {
    key = next;
      } else {
    htab.put (key, Coder.URLdecode (next));
    key = null;
      }
  }
  return htab;
    }
View Full Code Here

TOP

Related Classes of rabbit.util.SProperties

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.