FileDocCategorySizeDatePackage
HttpService.javaAPI DocGlassfish v2 API24388Wed May 23 21:12:44 BST 2007com.sun.enterprise.config.serverbeans

HttpService

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

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
ACCESS_LOG
public static final String
HTTP_LISTENER
public static final String
VIRTUAL_SERVER
public static final String
REQUEST_PROCESSING
public static final String
KEEP_ALIVE
public static final String
CONNECTION_POOL
public static final String
HTTP_PROTOCOL
public static final String
HTTP_FILE_CACHE
public static final String
ELEMENT_PROPERTY
Constructors Summary
public HttpService()


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

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(9);
		this.createProperty("access-log", ACCESS_LOG, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			AccessLog.class);
		this.createAttribute(ACCESS_LOG, "format", "Format", 
						AttrProp.CDATA,
						null, "%client.name% %auth-user-name% %datetime% %request% %status% %response.length%");
		this.createAttribute(ACCESS_LOG, "rotation-policy", "RotationPolicy", 
						AttrProp.CDATA,
						null, "time");
		this.createAttribute(ACCESS_LOG, "rotation-interval-in-minutes", "RotationIntervalInMinutes", 
						AttrProp.CDATA,
						null, "1440");
		this.createAttribute(ACCESS_LOG, "rotation-suffix", "RotationSuffix", 
						AttrProp.CDATA,
						null, "yyyyMMdd-HH'h'mm'm'ss's'");
		this.createAttribute(ACCESS_LOG, "rotation-enabled", "RotationEnabled", 
						AttrProp.CDATA,
						null, "true");
		this.createProperty("http-listener", HTTP_LISTENER, 
			Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			HttpListener.class);
		this.createAttribute(HTTP_LISTENER, "id", "Id", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(HTTP_LISTENER, "address", "Address", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(HTTP_LISTENER, "port", "Port", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(HTTP_LISTENER, "external-port", "ExternalPort", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(HTTP_LISTENER, "family", "Family", 
						AttrProp.CDATA,
						null, "inet");
		this.createAttribute(HTTP_LISTENER, "blocking-enabled", "BlockingEnabled", 
						AttrProp.CDATA,
						null, "false");
		this.createAttribute(HTTP_LISTENER, "acceptor-threads", "AcceptorThreads", 
						AttrProp.CDATA,
						null, "1");
		this.createAttribute(HTTP_LISTENER, "security-enabled", "SecurityEnabled", 
						AttrProp.CDATA,
						null, "false");
		this.createAttribute(HTTP_LISTENER, "default-virtual-server", "DefaultVirtualServer", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(HTTP_LISTENER, "server-name", "ServerName", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(HTTP_LISTENER, "redirect-port", "RedirectPort", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(HTTP_LISTENER, "xpowered-by", "XpoweredBy", 
						AttrProp.CDATA,
						null, "true");
		this.createAttribute(HTTP_LISTENER, "enabled", "Enabled", 
						AttrProp.CDATA,
						null, "true");
		this.createProperty("virtual-server", VIRTUAL_SERVER, 
			Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			VirtualServer.class);
		this.createAttribute(VIRTUAL_SERVER, "id", "Id", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(VIRTUAL_SERVER, "http-listeners", "HttpListeners", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(VIRTUAL_SERVER, "default-web-module", "DefaultWebModule", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(VIRTUAL_SERVER, "hosts", "Hosts", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(VIRTUAL_SERVER, "state", "State", 
						AttrProp.CDATA,
						null, "on");
		this.createAttribute(VIRTUAL_SERVER, "docroot", "Docroot", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(VIRTUAL_SERVER, "log-file", "LogFile", 
						AttrProp.CDATA,
						null, "${com.sun.aas.instanceRoot}/logs/server.log");
		this.createProperty("request-processing", REQUEST_PROCESSING, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			RequestProcessing.class);
		this.createAttribute(REQUEST_PROCESSING, "thread-count", "ThreadCount", 
						AttrProp.CDATA,
						null, "128");
		this.createAttribute(REQUEST_PROCESSING, "initial-thread-count", "InitialThreadCount", 
						AttrProp.CDATA,
						null, "48");
		this.createAttribute(REQUEST_PROCESSING, "thread-increment", "ThreadIncrement", 
						AttrProp.CDATA,
						null, "10");
		this.createAttribute(REQUEST_PROCESSING, "request-timeout-in-seconds", "RequestTimeoutInSeconds", 
						AttrProp.CDATA,
						null, "30");
		this.createAttribute(REQUEST_PROCESSING, "header-buffer-length-in-bytes", "HeaderBufferLengthInBytes", 
						AttrProp.CDATA,
						null, "4096");
		this.createProperty("keep-alive", KEEP_ALIVE, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			KeepAlive.class);
		this.createAttribute(KEEP_ALIVE, "thread-count", "ThreadCount", 
						AttrProp.CDATA,
						null, "1");
		this.createAttribute(KEEP_ALIVE, "max-connections", "MaxConnections", 
						AttrProp.CDATA,
						null, "256");
		this.createAttribute(KEEP_ALIVE, "timeout-in-seconds", "TimeoutInSeconds", 
						AttrProp.CDATA,
						null, "30");
		this.createProperty("connection-pool", CONNECTION_POOL, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ConnectionPool.class);
		this.createAttribute(CONNECTION_POOL, "queue-size-in-bytes", "QueueSizeInBytes", 
						AttrProp.CDATA,
						null, "4096");
		this.createAttribute(CONNECTION_POOL, "max-pending-count", "MaxPendingCount", 
						AttrProp.CDATA,
						null, "4096");
		this.createAttribute(CONNECTION_POOL, "receive-buffer-size-in-bytes", "ReceiveBufferSizeInBytes", 
						AttrProp.CDATA,
						null, "4096");
		this.createAttribute(CONNECTION_POOL, "send-buffer-size-in-bytes", "SendBufferSizeInBytes", 
						AttrProp.CDATA,
						null, "8192");
		this.createProperty("http-protocol", HTTP_PROTOCOL, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			HttpProtocol.class);
		this.createAttribute(HTTP_PROTOCOL, "version", "Version", 
						AttrProp.CDATA,
						null, "HTTP/1.1");
		this.createAttribute(HTTP_PROTOCOL, "dns-lookup-enabled", "DnsLookupEnabled", 
						AttrProp.CDATA,
						null, "false");
		this.createAttribute(HTTP_PROTOCOL, "forced-type", "ForcedType", 
						AttrProp.CDATA,
						null, "text/html; charset=iso-8859-1");
		this.createAttribute(HTTP_PROTOCOL, "default-type", "DefaultType", 
						AttrProp.CDATA,
						null, "text/html; charset=iso-8859-1");
		this.createAttribute(HTTP_PROTOCOL, "forced-response-type", "ForcedResponseType", 
						AttrProp.CDATA,
						null, "AttributeDeprecated");
		this.createAttribute(HTTP_PROTOCOL, "default-response-type", "DefaultResponseType", 
						AttrProp.CDATA,
						null, "AttributeDeprecated");
		this.createAttribute(HTTP_PROTOCOL, "ssl-enabled", "SslEnabled", 
						AttrProp.CDATA,
						null, "true");
		this.createProperty("http-file-cache", HTTP_FILE_CACHE, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			HttpFileCache.class);
		this.createAttribute(HTTP_FILE_CACHE, "globally-enabled", "GloballyEnabled", 
						AttrProp.CDATA,
						null, "true");
		this.createAttribute(HTTP_FILE_CACHE, "file-caching-enabled", "FileCachingEnabled", 
						AttrProp.CDATA,
						null, "on");
		this.createAttribute(HTTP_FILE_CACHE, "max-age-in-seconds", "MaxAgeInSeconds", 
						AttrProp.CDATA,
						null, "30");
		this.createAttribute(HTTP_FILE_CACHE, "medium-file-size-limit-in-bytes", "MediumFileSizeLimitInBytes", 
						AttrProp.CDATA,
						null, "537600");
		this.createAttribute(HTTP_FILE_CACHE, "medium-file-space-in-bytes", "MediumFileSpaceInBytes", 
						AttrProp.CDATA,
						null, "10485760");
		this.createAttribute(HTTP_FILE_CACHE, "small-file-size-limit-in-bytes", "SmallFileSizeLimitInBytes", 
						AttrProp.CDATA,
						null, "2048");
		this.createAttribute(HTTP_FILE_CACHE, "small-file-space-in-bytes", "SmallFileSpaceInBytes", 
						AttrProp.CDATA,
						null, "1048576");
		this.createAttribute(HTTP_FILE_CACHE, "file-transmission-enabled", "FileTransmissionEnabled", 
						AttrProp.CDATA,
						null, "false");
		this.createAttribute(HTTP_FILE_CACHE, "max-files-count", "MaxFilesCount", 
						AttrProp.CDATA,
						null, "1024");
		this.createAttribute(HTTP_FILE_CACHE, "hash-init-size", "HashInitSize", 
						AttrProp.CDATA,
						null, "0");
		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(HttpService.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, value, overwrite);
	
public intaddHttpListener(HttpListener value)

		return addHttpListener(value, true);
	
public intaddHttpListener(HttpListener value, boolean overwrite)

		HttpListener old = getHttpListenerById(value.getId());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(HttpService.class).getString("cannotAddDuplicate",  "HttpListener"));
		}
		return this.addValue(HTTP_LISTENER, value, overwrite);
	
public intaddVirtualServer(VirtualServer value)

		return addVirtualServer(value, true);
	
public intaddVirtualServer(VirtualServer value, boolean overwrite)

		VirtualServer old = getVirtualServerById(value.getId());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(HttpService.class).getString("cannotAddDuplicate",  "VirtualServer"));
		}
		return this.addValue(VIRTUAL_SERVER, 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("AccessLog");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getAccessLog();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(ACCESS_LOG, 0, str, indent);

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

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

		str.append(indent);
		str.append("RequestProcessing");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getRequestProcessing();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(REQUEST_PROCESSING, 0, str, indent);

		str.append(indent);
		str.append("KeepAlive");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getKeepAlive();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(KEEP_ALIVE, 0, str, indent);

		str.append(indent);
		str.append("ConnectionPool");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getConnectionPool();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(CONNECTION_POOL, 0, str, indent);

		str.append(indent);
		str.append("HttpProtocol");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getHttpProtocol();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(HTTP_PROTOCOL, 0, str, indent);

		str.append(indent);
		str.append("HttpFileCache");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getHttpFileCache();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(HTTP_FILE_CACHE, 0, 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("HttpService\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public AccessLoggetAccessLog()

		return (AccessLog)this.getValue(ACCESS_LOG);
	
public ConnectionPoolgetConnectionPool()

		return (ConnectionPool)this.getValue(CONNECTION_POOL);
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
	return null;
	
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 HttpFileCachegetHttpFileCache()

		return (HttpFileCache)this.getValue(HTTP_FILE_CACHE);
	
public HttpListenergetHttpListener(int index)

		return (HttpListener)this.getValue(HTTP_LISTENER, index);
	
public HttpListener[]getHttpListener()

		return (HttpListener[])this.getValues(HTTP_LISTENER);
	
public HttpListenergetHttpListenerById(java.lang.String id)

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

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

		return null;
		
	
public HttpProtocolgetHttpProtocol()

		return (HttpProtocol)this.getValue(HTTP_PROTOCOL);
	
public KeepAlivegetKeepAlive()

		return (KeepAlive)this.getValue(KEEP_ALIVE);
	
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 = "http-service";
	    return (null != ret ? ret.trim() : null);
	
public RequestProcessinggetRequestProcessing()

		return (RequestProcessing)this.getValue(REQUEST_PROCESSING);
	
public VirtualServergetVirtualServer(int index)

		return (VirtualServer)this.getValue(VIRTUAL_SERVER, index);
	
public VirtualServer[]getVirtualServer()

		return (VirtualServer[])this.getValues(VIRTUAL_SERVER);
	
public VirtualServergetVirtualServerById(java.lang.String id)

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

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

		return null;
		
	
voidinitialize(int options)


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

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

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

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

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

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

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

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

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

		return new VirtualServer();
	
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 intremoveHttpListener(HttpListener value)

		return this.removeValue(HTTP_LISTENER, value);
	
public intremoveHttpListener(HttpListener value, boolean overwrite)

		return this.removeValue(HTTP_LISTENER, value, overwrite);
	
public intremoveVirtualServer(VirtualServer value)

		return this.removeValue(VIRTUAL_SERVER, value);
	
public intremoveVirtualServer(VirtualServer value, boolean overwrite)

		return this.removeValue(VIRTUAL_SERVER, value, overwrite);
	
public voidsetAccessLog(AccessLog value)

		this.setValue(ACCESS_LOG, value);
	
public voidsetConnectionPool(ConnectionPool value)

		this.setValue(CONNECTION_POOL, value);
	
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetHttpFileCache(HttpFileCache value)

		this.setValue(HTTP_FILE_CACHE, value);
	
public voidsetHttpListener(HttpListener[] value)

		this.setValue(HTTP_LISTENER, value);
	
public voidsetHttpProtocol(HttpProtocol value)

		this.setValue(HTTP_PROTOCOL, value);
	
public voidsetKeepAlive(KeepAlive value)

		this.setValue(KEEP_ALIVE, value);
	
public voidsetRequestProcessing(RequestProcessing value)

		this.setValue(REQUEST_PROCESSING, value);
	
public voidsetVirtualServer(VirtualServer[] value)

		this.setValue(VIRTUAL_SERVER, value);
	
public intsizeElementProperty()

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

		return this.size(HTTP_LISTENER);
	
public intsizeVirtualServer()

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