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