예제 #1
0
  @SuppressWarnings("deprecation")
  @Override
  protected void logRoute(org.restlet.routing.Route route) {
    if (getLogger().isLoggable(Level.FINE)) {
      if (route instanceof HostRoute) {
        VirtualHost vhost = ((HostRoute) route).getVirtualHost();

        if (getComponent().getDefaultHost() == vhost) {
          getLogger().fine("The default host was selected.");
        } else {
          getLogger()
              .fine(
                  "This virtual host was selected: \""
                      + vhost.getHostScheme()
                      + "\", \""
                      + vhost.getHostDomain()
                      + "\", \""
                      + vhost.getHostPort()
                      + "\"");
        }
      } else {
        super.logRoute(route);
      }
    }
  }
예제 #2
0
파일: Engine.java 프로젝트: florhaf/ravent
 /** Clears the thread local variables set by the Restlet API and engine. */
 public static void clearThreadLocalVariables() {
   Response.setCurrent(null);
   Context.setCurrent(null);
   org.restlet.routing.VirtualHost.setCurrent(null);
   org.restlet.Application.setCurrent(null);
 }