1. package org.omg.PortableInterceptor;
  2. /**
  3. * org/omg/PortableInterceptor/PolicyFactoryOperations.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
  6. * Monday, February 23, 2004 7:03:06 AM GMT
  7. */
  8. /**
  9. * Enables policy types to be constructed using
  10. * <code>CORBA.ORB.create_policy</code>.
  11. * <p>
  12. * A portable ORB service implementation registers an instance of the
  13. * <code>PolicyFactory</code> interface during ORB initialization in order
  14. * to enable its policy types to be constructed using
  15. * <code>CORBA.ORB.create_policy</code>. The POA is required to preserve
  16. * any policy which is registered with <code>ORBInitInfo</code> in this
  17. * manner.
  18. *
  19. * @see ORBInitInfo#register_policy_factory
  20. */
  21. public interface PolicyFactoryOperations
  22. {
  23. /**
  24. * Returns an instance of the appropriate interface derived from
  25. * <code>CORBA.Policy</code> whose value corresponds to the
  26. * specified any.
  27. * <p>
  28. * The ORB calls <code>create_policy</code> on a registered
  29. * <code>PolicyFactory</code> instance when
  30. * <code>CORBA.ORB.create_policy</code> is called for the
  31. * <code>PolicyType</code> under which the <code>PolicyFactory</code> has
  32. * been registered. The <code>create_policy</code> operation then
  33. * returns an instance of the appropriate interface derived from
  34. * <code>CORBA.Policy</code> whose value corresponds to the specified
  35. * any. If it cannot, it shall throw an exception as described for
  36. * <code>CORBA.ORB.create_policy</code>.
  37. *
  38. * @param type An int specifying the type of policy being created.
  39. * @param value An any containing data with which to construct the
  40. * <code>CORBA.Policy</code>.
  41. * @return A <code>CORBA.Policy<code> object of the specified type and
  42. * value.
  43. */
  44. org.omg.CORBA.Policy create_policy (int type, org.omg.CORBA.Any value) throws org.omg.CORBA.PolicyError;
  45. } // interface PolicyFactoryOperations