1. /*
  2. * @(#)URLStreamHandlerFactory.java 1.15 00/02/02
  3. *
  4. * Copyright 1995-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.net;
  11. /**
  12. * This interface defines a factory for <code>URL</code> stream
  13. * protocol handlers.
  14. * <p>
  15. * It is used by the <code>URL</code> class to create a
  16. * <code>URLStreamHandler</code> for a specific protocol.
  17. *
  18. * @author Arthur van Hoff
  19. * @version 1.15, 02/02/00
  20. * @see java.net.URL
  21. * @see java.net.URLStreamHandler
  22. * @since JDK1.0
  23. */
  24. public interface URLStreamHandlerFactory {
  25. /**
  26. * Creates a new <code>URLStreamHandler</code> instance with the specified
  27. * protocol.
  28. *
  29. * @param protocol the protocol ("<code>ftp</code>",
  30. * "<code>http</code>", "<code>nntp</code>", etc.).
  31. * @return a <code>URLStreamHandler</code> for the specific protocol.
  32. * @see java.net.URLStreamHandler
  33. */
  34. URLStreamHandler createURLStreamHandler(String protocol);
  35. }