IURIResolver.as 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. Copyright (c) 2008, Adobe Systems Incorporated
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are
  6. met:
  7. * Redistributions of source code must retain the above copyright notice,
  8. this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. * Neither the name of Adobe Systems Incorporated nor the names of its
  13. contributors may be used to endorse or promote products derived from
  14. this software without specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  16. IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  17. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  18. PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  19. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  20. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  22. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  23. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  24. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. package com.adobe.net
  28. {
  29. /**
  30. * The URI class cannot know about DNS aliases, virtual hosts, or
  31. * symbolic links that may be involved. The application can provide
  32. * an implementation of this interface to resolve the URI before the
  33. * URI class makes any comparisons. For example, a web host has
  34. * two aliases:
  35. *
  36. * <p><code>
  37. * http://www.site.com/
  38. * http://www.site.net/
  39. * </code></p>
  40. *
  41. * <p>The application can provide an implementation that automatically
  42. * resolves site.net to site.com before URI compares two URI objects.
  43. * Only the application can know and understand the context in which
  44. * the URI's are being used.</p>
  45. *
  46. * <p>Use the URI.resolver accessor to assign a custom resolver to
  47. * the URI class. Any resolver specified is global to all instances
  48. * of URI.</p>
  49. *
  50. * <p>URI will call this before performing URI comparisons in the
  51. * URI.getRelation() and URI.getCommonParent() functions.
  52. *
  53. * @see URI.getRelation
  54. * @see URI.getCommonParent
  55. *
  56. * @langversion ActionScript 3.0
  57. * @playerversion Flash 9.0
  58. */
  59. public interface IURIResolver
  60. {
  61. /**
  62. * Implement this method to provide custom URI resolution for
  63. * your application.
  64. *
  65. * @langversion ActionScript 3.0
  66. * @playerversion Flash 9.0
  67. */
  68. function resolve(uri:URI) : URI;
  69. }
  70. }