/** * Make it easy for Factories to create a Factory instance. */ public static <T> Factory<T> create(Class<? extends Builder<T>> created) { return new Factory<T>(created); }
/** * Internal method to allow us to get the Builder from which we * will get JsonSerializer objects. * Do NOT call this method from outside of DWR. */ public static JsonSerializer attach(Container container) { return factory.attach(container); }
/** * Accessor for the current CallbackHelper. * @return The current CallbackHelper. */ public static CallbackHelper get() { return factory.get(); }
/** * Accessor for the current JsonParser. * @return The current JsonParser. */ public static JsonSerializer get() { return factory.get(); }
/** * Internal method to allow us to get the Builder from which we * will get Hub objects. * Do NOT call this method from outside of DWR. */ public static Hub attach(Container container) { return factory.attach(container); }
/** * Accessor for the current JsonParser. * @return The current JsonParser. */ public static JsonParser get() { return factory.get(); }
/** * Internal method to allow us to get the Builder from which we * will get CallbackHelper objects. * Do NOT call this method from outside of DWR. */ public static CallbackHelper attach(Container container) { return factory.attach(container); }
/** * Accessor for the current TaskDispatcher. * @return The current TaskDispatcher. */ public static TaskDispatcher get() { return factory.get(); }
/** * Internal method to allow us to get the Builder from which we * will get TaskDispatcher objects. * Do NOT call this method from outside of DWR. */ public static TaskDispatcher attach(Container container) { return factory.attach(container); }
/** * Accessor for the current Hub. * @return The current Hub. */ public static Hub get() { return factory.get(); }
/** * Internal method to allow us to get the Builder from which we * will get JsonParser objects. * Do NOT call this method from outside of DWR. */ public static JsonParser attach(Container container) { return factory.attach(container); }
/** * Accessor for the current ServerContext. * @return The current ServerContext. */ public static ServerContext get() { return factory.get(); }
/** * Internal method to allow us to get the Builder from which we * will get ServerContext objects. * Do NOT call this method from outside of DWR. */ public static ServerContext attach(Container container) { return factory.attach(container); }
/** * Accessor for the current Hub in more complex setups. * For some setups DWR may not be able to discover the correct environment * (i.e. ServerContext), so we need to tell it. This generally happens if * you have DWR configured twice in a single context. Unless you are writing * code that someone else will configure, it is probably safe to use the * simpler {@link #get()} method. * @param ctx The servlet context to allow us to bootstrap * @return The current Hub. */ public static Hub get(ServerContext ctx) { return factory.get(ctx); }
/** * Accessor for the current TaskDispatcher in more complex setups. * For some setups DWR may not be able to discover the correct environment * (i.e. ServletContext), so we need to tell it. This generally happens if * you have DWR configured twice in a single context. Unless you are writing * code that someone else will configure, it is probably safe to use the * simpler {@link #get()} method. * @param ctx The servlet context to allow us to bootstrap * @return The current TaskDispatcher. */ public static TaskDispatcher get(ServerContext ctx) { return factory.get(ctx); }
/** * Accessor for the current JsonSerializer in more complex setups. * For some setups DWR may not be able to discover the correct environment * (i.e. ServerContext), so we need to tell it. This generally happens if * you have DWR configured twice in a single context. Unless you are writing * code that someone else will configure, it is probably safe to use the * simpler {@link #get()} method. * @param ctx The servlet context to allow us to bootstrap * @return The current JsonSerializer. */ public static JsonSerializer get(ServerContext ctx) { return factory.get(ctx); }
/** * Accessor for the current JsonParser in more complex setups. * For some setups DWR may not be able to discover the correct environment * (i.e. ServerContext), so we need to tell it. This generally happens if * you have DWR configured twice in a single context. Unless you are writing * code that someone else will configure, it is probably safe to use the * simpler {@link #get()} method. * @param ctx The servlet context to allow us to bootstrap * @return The current JsonParser. */ public static JsonParser get(ServerContext ctx) { return factory.get(ctx); }
/** * Accessor for the current CallbackHelper in more complex setups. * For some setups DWR may not be able to discover the correct environment * (i.e. ServletContext), so we need to tell it. This generally happens if * you have DWR configured twice in a single context. Unless you are writing * code that someone else will configure, it is probably safe to use the * simpler {@link #get()} method. * @param ctx The servlet context to allow us to bootstrap * @return The current CallbackHelper. */ public static CallbackHelper get(ServerContext ctx) { return factory.get(ctx); }
/** * This method was designed to support more complex DWR setups, although * it is unlikely that it ever did this properly. If you have multiple * DWR servlets in a single ServletContext or wish to do cross-context * access to DWR then please contact the DWR mailing list. * @param ctx The servlet context to allow us to bootstrap * @return The current ServerContext. * @deprecated Use the plain ServerContextFactory.get() version * @see #get() */ @Deprecated public static ServerContext get(ServletContext ctx) { return factory.get(); }