1 23 24 26 27 28 package com.sun.enterprise.management.config; 29 30 import java.util.Map ; 31 import java.util.Set ; 32 import java.util.Collections ; 33 34 import javax.management.ObjectName ; 35 import javax.management.AttributeList ; 36 import javax.management.Attribute ; 37 38 import com.sun.appserv.management.util.misc.GSetUtil; 39 import com.sun.appserv.management.config.LBConfigKeys; 40 41 public final class LBConfigFactory extends ConfigFactory { 42 43 public LBConfigFactory(final ConfigFactoryCallback callbacks) { 44 super(callbacks); 45 } 46 47 private final Set <String > LEGAL_OPTIONAL_KEYS = 48 GSetUtil.newUnmodifiableStringSet( 49 LBConfigKeys.RESPONSE_TIMEOUT_IN_SECONDS_KEY, 50 LBConfigKeys.HTTPS_ROUTING_KEY, 51 LBConfigKeys.RELOAD_POLL_INTERVAL_IN_SECONDS_KEY, 52 LBConfigKeys.MONITORING_ENABLED_KEY, 53 LBConfigKeys.ROUTE_COOKIE_ENABLED_KEY 54 ); 55 56 protected Set <String > getLegalOptionalCreateKeys() { 57 return(LEGAL_OPTIONAL_KEYS); 58 } 59 60 public ObjectName create(String name, Map <String ,String > optional) { 61 final String [] required = {"name", name}; 62 final Map <String ,String > params = initParams(required, optional); 63 final ObjectName amxName = createNamedChild(name, params); 64 return amxName; 65 } 66 67 protected ObjectName createOldChildConfig(final AttributeList translatedAttrs) { 68 return getOldConfigProxies().getOldLbConfigs().createLbConfig(translatedAttrs); 69 } 70 71 public void removeByName(String name) { 72 getOldConfigProxies().getOldLbConfigs().removeLbConfigByName(name); 73 } 74 } 75 76 | Popular Tags |