Context registerContext ( final String path , final List < String > virtualHosts ) { VHostMapping host = null ; for ( final VHostMapping vhost : vHosts ) { if ( virtualHosts . equals ( vhost . getAliases ( ) ) ) { host = vhost ; break ; } } if ( host == null ) { host = new VHostMapping ( this , virtualHosts ) ; vHosts . add ( host ) ; } final Context context = new Context ( path , host , this ) ; contexts . add ( context ) ; return context ; }
Register a context .