Skip to main content

Initialization

Conduits/Destinations have access to the EndpointInfo object in their their constructors. Assuming they also have access to the bus, they can at any time in their lifecycle obtain the effective policy for the endpoint as follows:

class MyPolicyAwareConduit {
   static final QName assertionType = new QName("http://mycompany.com}", 
      "MyType"});

   void init() {
      PolicyEngine engine = bus.getExtenation(PolicyEngine.class);
      if (null != engine && engine.isEnabled()) {
      EffectiveEndpointPolicy ep = engine.getEndpointPolicy(endpoint, 
         this);
      Collection<Assertion> as = ep.getChosenAlternative();
      for (Assertion a : as) {
         if (assertType.equals(a.getName()) {
            // do something with it ...
         }
      }
      ... 
   }
   ...
}

and similarly for a Destination.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!