Remove a host alias @param alias The alias to remove
(String alias)
| 231 | * @param alias The alias to remove |
| 232 | */ |
| 233 | public synchronized void removeHostAlias(String alias) { |
| 234 | alias = renameWildcardHost(alias); |
| 235 | // Find and remove the alias |
| 236 | MappedHost hostMapping = exactFind(hosts, alias); |
| 237 | if (hostMapping == null || !hostMapping.isAlias()) { |
| 238 | return; |
| 239 | } |
| 240 | MappedHost[] newHosts = new MappedHost[hosts.length - 1]; |
| 241 | if (removeMap(hosts, newHosts, alias)) { |
| 242 | hosts = newHosts; |
| 243 | hostMapping.getRealHost().removeAlias(hostMapping); |
| 244 | } |
| 245 | |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * Replace {@link MappedHost#contextList} field in <code>realHost</code> and all its aliases with a new value. |