org.hd.d.pg2k.webSvr.virtualHosts
Class VirtualHosts.VirtualHost

java.lang.Object
  extended by org.hd.d.pg2k.webSvr.virtualHosts.VirtualHosts.VirtualHost
Enclosing class:
VirtualHosts

public static final class VirtualHosts.VirtualHost
extends java.lang.Object

Details of one virtual host. This supports hashCode() and equals() which work on the (normalised) name alone.


Field Summary
 java.util.Set<java.lang.String> normalisedAliasNames
          Immutable Set of normalised String hostname aliases for this virtual host; never null.
 java.lang.String normalisedName
          Normalised (prefix-less, all-lower-case, no-final-dot) virtual host name; non-null.
 java.lang.String skin
          Skin/livery name to be used; null if default is to be used.
 java.lang.String virtualRootDir
          Root of virtual host home page in main hierarchy, or null.
 
Constructor Summary
VirtualHosts.VirtualHost(java.lang.String hostname, java.lang.String root, java.lang.String skinName, java.lang.String[] aliases)
          Construct the record of one virtual host.
 
Method Summary
 java.lang.String toString()
          Return the normalisedName for the String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

normalisedName

public final java.lang.String normalisedName
Normalised (prefix-less, all-lower-case, no-final-dot) virtual host name; non-null.


virtualRootDir

public final java.lang.String virtualRootDir
Root of virtual host home page in main hierarchy, or null. Null if normal root (and normal home page) is used, else starts and ends with '/' but is not "/" and gives position of opening directory for virtual host.

The fact that this cannot be "/" makes it safe to do a redirect without checking the value.


skin

public final java.lang.String skin
Skin/livery name to be used; null if default is to be used.


normalisedAliasNames

public final java.util.Set<java.lang.String> normalisedAliasNames
Immutable Set of normalised String hostname aliases for this virtual host; never null. May be empty.

Entries are assumed to be deprecated and visitors (and spiders) arriving at these may be diverted to the normalisedName to concentrate activity on it.

Constructor Detail

VirtualHosts.VirtualHost

public VirtualHosts.VirtualHost(java.lang.String hostname,
                                java.lang.String root,
                                java.lang.String skinName,
                                java.lang.String[] aliases)
Construct the record of one virtual host.

Parameters:
hostname - non-null name of the host; will be stored normalised
root - root URI of home directory starting and ending with '/'; if null or "/" (stored as null) then normal home dir is to be used
skinName - name of livery or skin to be use on each page; if null or unrecognised then standard livery may be used
aliases - alias host names for the main host specified all values supplied will be normalised with duplicates removed; may be null or zero-length but entries may not be null or zero-length
Throws:
java.lang.IllegalArgumentException - if arguments are malformed
Method Detail

toString

public java.lang.String toString()
Return the normalisedName for the String representation.

Overrides:
toString in class java.lang.Object

DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.