/** * Creates a handler that automatically learns which resources to push based on the referer header * * @param maxEntries The maximum number of entries to store * @param next The next handler * @return A caching push handler */ public static LearningPushHandler learningPushHandler(int maxEntries, HttpHandler next) { return new LearningPushHandler(maxEntries, -1, next); }
/** * Creates a handler that automatically learns which resources to push based on the referer header * * @param maxEntries The maximum number of entries to store * @param maxAge The maximum age of the entries * @param next The next handler * @return A caching push handler */ public static LearningPushHandler learningPushHandler(int maxEntries, int maxAge, HttpHandler next) { return new LearningPushHandler(maxEntries, maxAge, next); }
@Override public HttpHandler wrap(HttpHandler handler) { return new LearningPushHandler(maxEntries, maxAge, handler); } };
/** * Creates a handler that automatically learns which resources to push based on the referer header * * @param maxEntries The maximum number of entries to store * @param maxAge The maximum age of the entries * @param next The next handler * @return A caching push handler */ public static LearningPushHandler learningPushHandler(int maxEntries, int maxAge, HttpHandler next) { return new LearningPushHandler(maxEntries, maxAge, next); }
@Override public HttpHandler wrap(HttpHandler handler) { return new LearningPushHandler(maxEntries, maxAge, handler); } };
/** * Creates a handler that automatically learns which resources to push based on the referer header * * @param maxEntries The maximum number of entries to store * @param next The next handler * @return A caching push handler */ public static LearningPushHandler learningPushHandler(int maxEntries, HttpHandler next) { return new LearningPushHandler(maxEntries, -1, next); }
/** * Creates a handler that automatically learns which resources to push based on the referer header * * @param maxEntries The maximum number of entries to store * @param next The next handler * @return A caching push handler */ public static LearningPushHandler learningPushHandler(int maxEntries, HttpHandler next) { return new LearningPushHandler(maxEntries, -1, next); }
/** * Creates a handler that automatically learns which resources to push based on the referer header * * @param maxEntries The maximum number of entries to store * @param maxAge The maximum age of the entries * @param next The next handler * @return A caching push handler */ public static LearningPushHandler learningPushHandler(int maxEntries, int maxAge, HttpHandler next) { return new LearningPushHandler(maxEntries, maxAge, next); }
@Override public HttpHandler wrap(HttpHandler handler) { return new LearningPushHandler(maxEntries, maxAge, handler); } };
new LearningPushHandler(100, -1, Handlers.header(ph, "x-undertow-transport", ExchangeAttributes.transportProtocol())),