FileDocCategorySizeDatePackage
JmsService.javaAPI DocGlassfish v2 API19092Fri May 26 10:47:08 BST 2006com.sun.enterprise.config.serverbeans

JmsService

public class JmsService extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class JmsService matches the DTD element jms-service

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
JMS_HOST
public static final String
ELEMENT_PROPERTY
Constructors Summary
public JmsService()


	  
		this(Common.USE_DEFAULT_VALUES);
	
public JmsService(int options)

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(2);
		this.createProperty("jms-host", JMS_HOST, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			JmsHost.class);
		this.createAttribute(JMS_HOST, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(JMS_HOST, "host", "Host", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(JMS_HOST, "port", "Port", 
						AttrProp.CDATA,
						null, "7676");
		this.createAttribute(JMS_HOST, "admin-user-name", "AdminUserName", 
						AttrProp.CDATA,
						null, "admin");
		this.createAttribute(JMS_HOST, "admin-password", "AdminPassword", 
						AttrProp.CDATA,
						null, "admin");
		this.createProperty("property", ELEMENT_PROPERTY, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ElementProperty.class);
		this.createAttribute(ELEMENT_PROPERTY, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(ELEMENT_PROPERTY, "value", "Value", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddElementProperty(ElementProperty value)

		return addElementProperty(value, true);
	
public intaddElementProperty(ElementProperty value, boolean overwrite)

		ElementProperty old = getElementPropertyByName(value.getName());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(JmsService.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, value, overwrite);
	
public intaddJmsHost(JmsHost value)

		return addJmsHost(value, true);
	
public intaddJmsHost(JmsHost value, boolean overwrite)

		JmsHost old = getJmsHostByName(value.getName());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(JmsService.class).getString("cannotAddDuplicate",  "JmsHost"));
		}
		return this.addValue(JMS_HOST, value, overwrite);
	
public voiddump(java.lang.StringBuffer str, java.lang.String indent)

		String s;
		Object o;
		org.netbeans.modules.schema2beans.BaseBean n;
		str.append(indent);
		str.append("JmsHost["+this.sizeJmsHost()+"]");	// NOI18N
		for(int i=0; i<this.sizeJmsHost(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getJmsHost(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(JMS_HOST, i, str, indent);
		}

		str.append(indent);
		str.append("ElementProperty["+this.sizeElementProperty()+"]");	// NOI18N
		for(int i=0; i<this.sizeElementProperty(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getElementProperty(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(ELEMENT_PROPERTY, i, str, indent);
		}

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("JmsService\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetAddresslistBehavior()
Getter for AddresslistBehavior of the Element jms-service

return
the AddresslistBehavior of the Element jms-service

		return getAttributeValue(ServerTags.ADDRESSLIST_BEHAVIOR);
	
public java.lang.StringgetAddresslistIterations()
Getter for AddresslistIterations of the Element jms-service

return
the AddresslistIterations of the Element jms-service

		return getAttributeValue(ServerTags.ADDRESSLIST_ITERATIONS);
	
public static java.lang.StringgetDefaultAddresslistBehavior()
Get the default value of AddresslistBehavior from dtd

		return "random".trim();
	
public static java.lang.StringgetDefaultAddresslistIterations()
Get the default value of AddresslistIterations from dtd

		return "3".trim();
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
		if(attr.equals(ServerTags.INIT_TIMEOUT_IN_SECONDS)) return "60".trim();
		if(attr.equals(ServerTags.RECONNECT_INTERVAL_IN_SECONDS)) return "5".trim();
		if(attr.equals(ServerTags.RECONNECT_ATTEMPTS)) return "3".trim();
		if(attr.equals(ServerTags.RECONNECT_ENABLED)) return "true".trim();
		if(attr.equals(ServerTags.ADDRESSLIST_BEHAVIOR)) return "random".trim();
		if(attr.equals(ServerTags.ADDRESSLIST_ITERATIONS)) return "3".trim();
	return null;
	
public static java.lang.StringgetDefaultInitTimeoutInSeconds()
Get the default value of InitTimeoutInSeconds from dtd

		return "60".trim();
	
public java.lang.StringgetDefaultJmsHost()
Getter for DefaultJmsHost of the Element jms-service

return
the DefaultJmsHost of the Element jms-service

			return getAttributeValue(ServerTags.DEFAULT_JMS_HOST);
	
public static java.lang.StringgetDefaultReconnectAttempts()
Get the default value of ReconnectAttempts from dtd

		return "3".trim();
	
public static java.lang.StringgetDefaultReconnectEnabled()
Get the default value of ReconnectEnabled from dtd

		return "true".trim();
	
public static java.lang.StringgetDefaultReconnectIntervalInSeconds()
Get the default value of ReconnectIntervalInSeconds from dtd

		return "5".trim();
	
public ElementPropertygetElementProperty(int index)

		return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
	
public ElementProperty[]getElementProperty()

		return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
	
public ElementPropertygetElementPropertyByName(java.lang.String id)

	 if (null != id) { id = id.trim(); }
	ElementProperty[] o = getElementProperty();
	 if (o == null) return null;

	 for (int i=0; i < o.length; i++) {
	     if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
	         return o[i];
	     }
	 }

		return null;
		
	
public java.lang.StringgetInitTimeoutInSeconds()
Getter for InitTimeoutInSeconds of the Element jms-service

return
the InitTimeoutInSeconds of the Element jms-service

		return getAttributeValue(ServerTags.INIT_TIMEOUT_IN_SECONDS);
	
public JmsHostgetJmsHost(int index)

		return (JmsHost)this.getValue(JMS_HOST, index);
	
public JmsHost[]getJmsHost()

		return (JmsHost[])this.getValues(JMS_HOST);
	
public JmsHostgetJmsHostByName(java.lang.String id)

	 if (null != id) { id = id.trim(); }
	JmsHost[] o = getJmsHost();
	 if (o == null) return null;

	 for (int i=0; i < o.length; i++) {
	     if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
	         return o[i];
	     }
	 }

		return null;
		
	
public java.lang.StringgetMqScheme()
Getter for MqScheme of the Element jms-service

return
the MqScheme of the Element jms-service

			return getAttributeValue(ServerTags.MQ_SCHEME);
	
public java.lang.StringgetMqService()
Getter for MqService of the Element jms-service

return
the MqService of the Element jms-service

			return getAttributeValue(ServerTags.MQ_SERVICE);
	
public java.lang.StringgetReconnectAttempts()
Getter for ReconnectAttempts of the Element jms-service

return
the ReconnectAttempts of the Element jms-service

		return getAttributeValue(ServerTags.RECONNECT_ATTEMPTS);
	
public java.lang.StringgetReconnectIntervalInSeconds()
Getter for ReconnectIntervalInSeconds of the Element jms-service

return
the ReconnectIntervalInSeconds of the Element jms-service

		return getAttributeValue(ServerTags.RECONNECT_INTERVAL_IN_SECONDS);
	
protected java.lang.StringgetRelativeXPath()
get the xpath representation for this element returns something like abc[@name='value'] or abc depending on the type of the bean

	    String ret = null;
	    ret = "jms-service";
	    return (null != ret ? ret.trim() : null);
	
public java.lang.StringgetStartArgs()
Getter for StartArgs of the Element jms-service

return
the StartArgs of the Element jms-service

			return getAttributeValue(ServerTags.START_ARGS);
	
public java.lang.StringgetType()
Getter for Type of the Element jms-service

return
the Type of the Element jms-service

		return getAttributeValue(ServerTags.TYPE);
	
voidinitialize(int options)


	
public booleanisReconnectEnabled()
Getter for ReconnectEnabled of the Element jms-service

return
the ReconnectEnabled of the Element jms-service

		return toBoolean(getAttributeValue(ServerTags.RECONNECT_ENABLED));
	
public ElementPropertynewElementProperty()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new ElementProperty();
	
public JmsHostnewJmsHost()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new JmsHost();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveElementProperty(ElementProperty value)

		return this.removeValue(ELEMENT_PROPERTY, value);
	
public intremoveElementProperty(ElementProperty value, boolean overwrite)

		return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
	
public intremoveJmsHost(JmsHost value)

		return this.removeValue(JMS_HOST, value);
	
public intremoveJmsHost(JmsHost value, boolean overwrite)

		return this.removeValue(JMS_HOST, value, overwrite);
	
public voidsetAddresslistBehavior(java.lang.String v, boolean overwrite)
Modify the AddresslistBehavior of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.ADDRESSLIST_BEHAVIOR, v, overwrite);
	
public voidsetAddresslistBehavior(java.lang.String v)
Modify the AddresslistBehavior of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.ADDRESSLIST_BEHAVIOR, v);
	
public voidsetAddresslistIterations(java.lang.String v, boolean overwrite)
Modify the AddresslistIterations of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.ADDRESSLIST_ITERATIONS, v, overwrite);
	
public voidsetAddresslistIterations(java.lang.String v)
Modify the AddresslistIterations of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.ADDRESSLIST_ITERATIONS, v);
	
public voidsetDefaultJmsHost(java.lang.String v, boolean overwrite)
Modify the DefaultJmsHost of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.DEFAULT_JMS_HOST, v, overwrite);
	
public voidsetDefaultJmsHost(java.lang.String v)
Modify the DefaultJmsHost of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.DEFAULT_JMS_HOST, v);
	
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetInitTimeoutInSeconds(java.lang.String v, boolean overwrite)
Modify the InitTimeoutInSeconds of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.INIT_TIMEOUT_IN_SECONDS, v, overwrite);
	
public voidsetInitTimeoutInSeconds(java.lang.String v)
Modify the InitTimeoutInSeconds of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.INIT_TIMEOUT_IN_SECONDS, v);
	
public voidsetJmsHost(JmsHost[] value)

		this.setValue(JMS_HOST, value);
	
public voidsetMqScheme(java.lang.String v, boolean overwrite)
Modify the MqScheme of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.MQ_SCHEME, v, overwrite);
	
public voidsetMqScheme(java.lang.String v)
Modify the MqScheme of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.MQ_SCHEME, v);
	
public voidsetMqService(java.lang.String v, boolean overwrite)
Modify the MqService of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.MQ_SERVICE, v, overwrite);
	
public voidsetMqService(java.lang.String v)
Modify the MqService of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.MQ_SERVICE, v);
	
public voidsetReconnectAttempts(java.lang.String v, boolean overwrite)
Modify the ReconnectAttempts of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.RECONNECT_ATTEMPTS, v, overwrite);
	
public voidsetReconnectAttempts(java.lang.String v)
Modify the ReconnectAttempts of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.RECONNECT_ATTEMPTS, v);
	
public voidsetReconnectEnabled(boolean v, boolean overwrite)
Modify the ReconnectEnabled of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.RECONNECT_ENABLED, ""+(v==true), overwrite);
	
public voidsetReconnectEnabled(boolean v)
Modify the ReconnectEnabled of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.RECONNECT_ENABLED, ""+(v==true));
	
public voidsetReconnectIntervalInSeconds(java.lang.String v, boolean overwrite)
Modify the ReconnectIntervalInSeconds of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.RECONNECT_INTERVAL_IN_SECONDS, v, overwrite);
	
public voidsetReconnectIntervalInSeconds(java.lang.String v)
Modify the ReconnectIntervalInSeconds of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.RECONNECT_INTERVAL_IN_SECONDS, v);
	
public voidsetStartArgs(java.lang.String v, boolean overwrite)
Modify the StartArgs of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.START_ARGS, v, overwrite);
	
public voidsetStartArgs(java.lang.String v)
Modify the StartArgs of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.START_ARGS, v);
	
public voidsetType(java.lang.String v, boolean overwrite)
Modify the Type of the Element jms-service

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.TYPE, v, overwrite);
	
public voidsetType(java.lang.String v)
Modify the Type of the Element jms-service

param
v the new value

		setAttributeValue(ServerTags.TYPE, v);
	
public intsizeElementProperty()

		return this.size(ELEMENT_PROPERTY);
	
public intsizeJmsHost()

		return this.size(JMS_HOST);
	
public voidvalidate()