use of com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator in project metro-jax-ws by eclipse-ee4j.
the class PolicyUtil method getPortScopedFeatures.
/**
* Returns the list of features that correspond to the policies in the policy
* map for a give port
*
* @param policyMap The service policies
* @param serviceName The service name
* @param portName The service port name
* @return List of features for the given port corresponding to the policies in the map
*/
public static Collection<WebServiceFeature> getPortScopedFeatures(PolicyMap policyMap, QName serviceName, QName portName) {
LOGGER.entering(policyMap, serviceName, portName);
Collection<WebServiceFeature> features = new ArrayList<>();
try {
final PolicyMapKey key = PolicyMap.createWsdlEndpointScopeKey(serviceName, portName);
for (PolicyFeatureConfigurator configurator : CONFIGURATORS) {
Collection<WebServiceFeature> additionalFeatures = configurator.getFeatures(key, policyMap);
if (additionalFeatures != null) {
features.addAll(additionalFeatures);
}
}
} catch (PolicyException e) {
throw new WebServiceException(e);
}
LOGGER.exiting(features);
return features;
}
Aggregations