- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<VirtualHost>
-
- com.aoindustries.aoserv.client.web.VirtualHost
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,Disablable,SingleTableObject<Integer,VirtualHost>
public final class VirtualHost extends CachedObjectIntegerKey<VirtualHost> implements Disablable
- Author:
- AO Industries, Inc.
- See Also:
Site
-
-
Field Summary
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
-
Fields inherited from class com.aoindustries.aoserv.client.AOServObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
-
Constructor Summary
Constructors Constructor Description VirtualHost()
-
Method Summary
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
-
Methods inherited from class com.aoindustries.aoserv.client.AOServObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxID, getLinuxUserName, getMacAddress, getMySQLDatabaseName, getMySQLServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
-
-
-
Method Detail
-
toStringImpl
public String toStringImpl() throws SQLException, IOException
Description copied from class:AOServObjectAOServObject.toString()implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAOServObject.toString()on the key (fromAOServObject.getKey()). When the key isnull, uses the default implementation fromObject.toString().- Overrides:
toStringImplin classCachedObjectIntegerKey<VirtualHost>- Throws:
SQLExceptionIOException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,VirtualHost>
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,VirtualHost>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,VirtualHost>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,VirtualHost>- Throws:
IOException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,VirtualHost>- Throws:
IOException
-
getHttpdSite
public Site getHttpdSite() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getHttpdBind
public HttpdBind getHttpdBind() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getName
public String getName()
Gets the name of the bind. The default per-(site, ip, bind) has a null name. Additional binds per (site, ip, bind) will have non-empty names. The name is unique per (site, ip, bind), including only one default bind.- See Also:
getSystemdEscapedName()
-
getSystemdEscapedName
public String getSystemdEscapedName()
Gets the systemd-encoded name of the bind.- See Also:
getName(),SystemdUtil.encode(java.lang.String)
-
getAccessLog
public PosixPath getAccessLog()
-
getErrorLog
public PosixPath getErrorLog()
-
getCertificate
public Certificate getCertificate() throws SQLException, IOException
Gets the SSL certificate for this server.- Returns:
- the SSL certificate or
nullwhen filtered or not applicable - Throws:
SQLExceptionIOException
-
getDisableLog
public DisableLog getDisableLog() throws SQLException, IOException
- Specified by:
getDisableLogin interfaceDisablable- Throws:
SQLExceptionIOException
-
isDisabled
public boolean isDisabled()
Description copied from interface:DisablableChecks if this object is disabled. This should execute very quickly (not incur any round-trip to any database) and thus does not throw any checked exceptions.- Specified by:
isDisabledin interfaceDisablable
-
canDisable
public boolean canDisable()
- Specified by:
canDisablein interfaceDisablable
-
canEnable
public boolean canEnable() throws SQLException, IOException- Specified by:
canEnablein interfaceDisablable- Throws:
SQLExceptionIOException
-
disable
public void disable(DisableLog dl) throws IOException, SQLException
- Specified by:
disablein interfaceDisablable- Throws:
IOExceptionSQLException
-
enable
public void enable() throws IOException, SQLException- Specified by:
enablein interfaceDisablable- Throws:
IOExceptionSQLException
-
getPredisableConfig
public String getPredisableConfig()
-
setPredisableConfig
public void setPredisableConfig(String config) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
isManual
public boolean isManual()
-
setIsManual
public void setIsManual(boolean isManual) throws IOException, SQLException- Throws:
IOExceptionSQLException
-
getRedirectToPrimaryHostname
public boolean getRedirectToPrimaryHostname()
-
setRedirectToPrimaryHostname
public void setRedirectToPrimaryHostname(boolean redirectToPrimaryHostname) throws IOException, SQLException- Throws:
IOExceptionSQLException
-
getIncludeSiteConfig
public String getIncludeSiteConfig()
Controls whether this bind includes the per-site configuration file. Will be one of:null- Automatic mode"true"- Include manually enabled"false"- Include manually disabled"IfModule <module_name>"- Include when a module is enabled"IfModule !<module_name>"- Include when a module is disabled- Any future unrecognized value should be treated as equivalent to
null(automatic mode)
-
getHttpdSiteURLs
public List<VirtualHostName> getHttpdSiteURLs() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getPrimaryHttpdSiteURL
public VirtualHostName getPrimaryHttpdSiteURL() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getAltHttpdSiteURLs
public List<VirtualHostName> getAltHttpdSiteURLs() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addHttpdSiteURL
public int addHttpdSiteURL(DomainName hostname) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHttpdSiteBindHeaders
public List<Header> getHttpdSiteBindHeaders() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getRewriteRules
public List<RewriteRule> getRewriteRules() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
-