1 23 24 package com.sun.enterprise.admin.server.core.mbean.config; 25 26 import javax.management.*; 28 29 import com.sun.enterprise.config.ConfigException; 31 import com.sun.enterprise.config.serverbeans.ServerTags; 32 import com.sun.enterprise.config.serverbeans.ServerXPathHelper; 33 import com.sun.enterprise.config.ConfigContext; 34 import com.sun.enterprise.config.serverbeans.MailResource; 35 import com.sun.enterprise.config.serverbeans.ElementProperty; 36 import com.sun.enterprise.config.ConfigBeansFactory; 37 38 import com.sun.enterprise.admin.util.ArgChecker; 40 import com.sun.enterprise.admin.util.StringValidator; 41 import com.sun.enterprise.admin.common.constant.ConfigAttributeName; 42 import com.sun.enterprise.admin.common.exception.MBeanConfigException; 43 import com.sun.enterprise.admin.common.ObjectNames; 44 45 51 public class ManagedJavaMailResource extends ConfigMBeanBase implements ConfigAttributeName.MailResource 52 { 53 private static final String [][] MAPLIST = 54 { 55 {kJndiName, ATTRIBUTE + ServerTags.JNDI_NAME}, 56 {kStoreProtocol, ATTRIBUTE + ServerTags.STORE_PROTOCOL}, 58 {kStoreProtocolClass, ATTRIBUTE + ServerTags.STORE_PROTOCOL_CLASS}, 59 {kTransportProtocol, ATTRIBUTE + ServerTags.TRANSPORT_PROTOCOL}, 60 {kTransportProtocolClass, ATTRIBUTE + ServerTags.TRANSPORT_PROTOCOL_CLASS}, 61 {kHost, ATTRIBUTE + ServerTags.HOST}, 62 {kUser, ATTRIBUTE + ServerTags.USER}, 63 {kFrom, ATTRIBUTE + ServerTags.FROM}, 64 {kDebug, ATTRIBUTE + ServerTags.DEBUG}, 65 {kDescription, ATTRIBUTE + PSEUDO_ATTR_DESCRIPTION} 66 67 }; 68 69 private static final String [] ATTRIBUTES = 70 { 71 kJndiName + " ,String, R", 72 kStoreProtocol + " ,String, RW", 74 kStoreProtocolClass + " ,String, RW", 75 kTransportProtocol + " ,String, RW", 76 kTransportProtocolClass + " ,String, RW", 77 kHost + " ,String, RW", 78 kUser + " ,String, RW", 79 kFrom + " ,String, RW", 80 kDebug + " ,boolean, RW", 81 kDescription + " ,String, RW", 82 }; 83 84 private static final String [] OPERATIONS = null; 85 86 89 public ManagedJavaMailResource() throws MBeanConfigException 90 { 91 this.setDescriptions(MAPLIST, ATTRIBUTES, OPERATIONS); 92 } 93 94 99 public ManagedJavaMailResource(String instanceName, 100 String jndiName) 101 throws MBeanConfigException 102 { 103 this(); initialize(ObjectNames.kMailResourceType, new String []{instanceName, jndiName}); 105 } 106 107 } 108 | Popular Tags |