Example #1
0
 // Construct configured dispatchers by reflection. Returns always
 // a list, an empty one if no request dispatcher should be created
 private List<RequestDispatcher> createRequestDispatchers(
     String pClasses, Converters pConverters, ServerHandle pServerHandle, Restrictor pRestrictor) {
   List<RequestDispatcher> ret = new ArrayList<RequestDispatcher>();
   if (pClasses != null && pClasses.length() > 0) {
     String[] names = pClasses.split("\\s*,\\s*");
     for (String name : names) {
       ret.add(createDispatcher(name, pConverters, pServerHandle, pRestrictor));
     }
   }
   return ret;
 }
Example #2
0
  // Initialize this object;
  private void init(Configuration pConfig) {
    // Central objects
    converters = new Converters();
    initLimits(pConfig);

    // Create and remember request dispatchers
    localDispatcher = new LocalRequestDispatcher(converters, restrictor, pConfig, logHandler);
    ServerHandle serverHandle = localDispatcher.getServerInfo();
    requestDispatchers =
        createRequestDispatchers(
            pConfig.get(DISPATCHER_CLASSES), converters, serverHandle, restrictor);
    requestDispatchers.add(localDispatcher);

    // Backendstore for remembering agent state
    initStores(pConfig);
  }