code: public static SiteIdentifier single (final int siteId, final String siteString) {
          return new SiteIdentifier() {
              public int identifySite (HttpServletRequest req) {
                  return siteId;
              }
              public String getSiteString (int siteId) {
                  return siteString;
              }
              public int getSiteId (String siteString) {
                  return siteId;
              }
              public Iterator<Site> enumerateSites () {
                  return Collections.singletonList(new Site(siteId, siteString)).iterator();
              }
          };
      }
docs: Returns a site identifier that returns the specified site always.