Modify configuration settings of the outbound HTTP connection
We can change configuration settings of the outbound HTTP connection using the following interfaces: ModifiableOutboundConnectionProfile, ModifiablePolicyMapping, ModifiablePolicyRule, ModifiableCookieRule, and ModifiablePolicyVariable.
We can access these interfaces using the method OutboundConnectionModelController.getModifiableNode(). Changes that you make are not immediately applied at the data backend. We must confirm the changes. The following code example illustrates how we can modify configuration settings:
OutboundConnectionModel model; // For information about how to instantiate this model // refer to the previous examples. OutboundConnectionModelController ctrl; // For information about how to instantiate this // controller, refer to the previous examples. PolicyRule rule;// Refer to previous examples, how to instantiate this policy rule System.out.println("The original URL pattern of the PolicyRule is "+rule.getUrlPattern()); // Get the Modifiable.. interface for the selected Policy rule. Change the URL pattern setting. ModifiablePolicyRule mrule = (ModifiablePolicyRule)ctrl.getModifiableNode(rule); mrule.setUrlPattern("http://localhost:9091/*"); // Apply the changes. ctrl.commit(); System.out.println("The URL pattern of the PolicyRule is now "+rule.getUrlPattern());
Parent Configure outbound HTTP connections using the Model Controller SPIPrevious topic: View the configuration settings of the outbound HTTP connection
Next topic: Create and delete configuration settings of the outbound HTTP connection