本文整理匯總了Java中org.oscm.app.iaas.exceptions.PolicyConfigurationException類的典型用法代碼示例。如果您正苦於以下問題:Java PolicyConfigurationException類的具體用法?Java PolicyConfigurationException怎麽用?Java PolicyConfigurationException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PolicyConfigurationException類屬於org.oscm.app.iaas.exceptions包,在下文中一共展示了PolicyConfigurationException類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addHostToZone
import org.oscm.app.iaas.exceptions.PolicyConfigurationException; //導入依賴的package包/類
private void addHostToZone(HashMap<String, String> hostToZone,
HashMap<String, String> hostToZone_alt, String hostname, String zone)
throws PolicyConfigurationException {
String currentZone = hostToZone.get(hostname);
if (currentZone != null && !currentZone.equals(zone)) {
// TODO NLS
throw new PolicyConfigurationException(
"Firewall policies can not address one server within different zones: "
+ currentZone + "(" + hostname + ") vs. " + zone
+ "(" + hostname + ")");
}
currentZone = hostToZone_alt.get(hostname);
if (currentZone != null && !currentZone.equals(zone)) {
// TODO NLS
throw new PolicyConfigurationException(
"Firewall policies can not address one server within different zones: "
+ currentZone + "(" + hostname + ") vs. " + zone
+ "(" + hostname + ")");
}
hostToZone.put(hostname, zone);
}