Beispiel #1
0
  /**
   * Factory method to create a TelnetD singleton instance, loading the standard properties files
   * from the given String containing an URL location.<br>
   *
   * @param int stream containing properties
   * @return TenetD instance that has been properly set up according to the passed in properties,
   *     and is ready to start serving.
   * @throws BootException if the setup process fails.
   */
  public static TelnetD createTelnetD(InputStream in) throws BootException {

    try {
      return createTelnetD(PropertiesLoader.loadProperties(in));
    } catch (IOException ex) {
      log.error(ex);
      throw new BootException("Failed to load configuration from given stream.");
    }
  } // createTelnetD
Beispiel #2
0
  /**
   * Factory method to create a TelnetD singleton instance, loading the standard properties files
   * from the given String containing an URL location.<br>
   *
   * @param urlprefix String containing an URL prefix.
   * @return TenetD instance that has been properly set up according to the passed in properties,
   *     and is ready to start serving.
   * @throws BootException if the setup process fails.
   */
  public static TelnetD createTelnetD(String urlprefix) throws BootException {

    try {
      return createTelnetD(PropertiesLoader.loadProperties(urlprefix));
    } catch (IOException ex) {
      log.error(ex);
      throw new BootException("Failed to load configuration from given URL.");
    }
  } // createTelnetD