code: @SuppressWarnings("unchecked")
      public void addServiceAgiScript(Class< ? extends ServiceAgiScript> handler)
              throws DuplicateScriptException, InstantiationException, IllegalAccessException
      {
  
          logger.info("loading agi handler {}" + handler.getCanonicalName());
          ServiceAgiScript tmpHandler = handler.newInstance();
          if (handlers.containsKey(tmpHandler.getScriptName()))
          {
              throw new DuplicateScriptException("Script " + tmpHandler.getScriptName() + " already exists");
          }
          String[] parameters = tmpHandler.getParameters();
          String sample = "Agi(agi://localhost/" + tmpHandler.getScriptName() + ".agi";
          logger.info("********************************************");
          logger.info("registered new agi script: " + tmpHandler.getScriptName());
          for (int i = 0; i < parameters.length; i++)
          {
              logger.info("parameter: " + parameters[i]);
              if (i == 0)
                  sample += "?" + parameters[i] + "=testdata";
              else
                  sample += "&" + parameters[i] + "=testdata";
          }
  
          logger.info("sample usage...");
          logger.info(sample + ")");
          Class<ServiceAgiScript> handler2 = (Class<ServiceAgiScript>) handler;
          handlers.put(tmpHandler.getScriptName(), handler2);
      }
docs: this will be a pluggable extension system for the agi core, it's still a
  work in progress and is not useable
  
  @param handler
  @throws DuplicateScriptException
  @throws IllegalAccessException
  @throws InstantiationException