1. /*
  2. * @(#)DataCollector.java 1.13 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 com.sun.corba.se.spi.orb ;
  8. import java.applet.Applet ;
  9. import java.util.Properties ;
  10. import java.util.Vector ;
  11. /** Interface for collecting all sources of ORB configuration properties
  12. * into a single properties object. A PropertyParser is needed so that
  13. * the set of property names of interest is known.
  14. */
  15. public interface DataCollector {
  16. /** Return true iff this DataCollector was created from
  17. * applet data.
  18. */
  19. boolean isApplet() ;
  20. /** Return true iff the local host and ORB initial host are the same.
  21. * This is provided to avoid exposing the local host in insecure
  22. * contexts.
  23. */
  24. boolean initialHostIsLocal() ;
  25. /** Set the parser which is used to obtain property names.
  26. * This must be called before getProperties
  27. * may be called. It may be called multiple times if different
  28. * sets of properties are needed for the same data sources.
  29. */
  30. void setParser( PropertyParser parser ) ;
  31. /** Return the consolidated property information to be used
  32. * for ORB configuration. Note that -ORBInitRef arguments are
  33. * handled specially: all -ORBInitRef name=value arguments are
  34. * converted into ( org.omg.CORBA.ORBInitRef.name, value )
  35. * mappings in the resulting properties. Also, -ORBInitialServices
  36. * is handled specially in applet mode: they are converted from
  37. * relative to absolute URLs.
  38. * @raises IllegalStateException if setPropertyNames has not
  39. * been called.
  40. */
  41. Properties getProperties() ;
  42. }