/** * Binds this configuration to the application instance * * @param application */ public void configure(Application application) { application.setMetaData(KEY, this); }
public static void set(Application application, WebSocketSettings settings) { application.setMetaData(KEY, settings); } }
/** * Binds current instance of the injector to the Application. After this method is called this * instance of injector will be returned from subsequent calls to {@link #get()} whenever the * specified application object is active in the thread. * * @param application */ public void bind(final Application application) { application.setMetaData(KEY, this); }
public static void set(Application application, WebSocketSettings settings) { application.setMetaData(KEY, settings); } }
/** * Sets the specified {@link ApplicationDebugSettingsPlugin} in the application metadata. * * @param app * the app * @param plugin * the plugin */ public void set(final Application app, final ApplicationDebugSettingsPlugin plugin) { app.setMetaData(DEBUG_SETTINGS_PLUGIN_KEY, plugin); }
/** * Binds this container instance to the {@link Application}, making it possible to retrieve it * later * * @param application */ protected void bind(Application application) { application.setMetaData(CONTEXT_KEY, this); }
/** * Sets the specified {@link SecuritySettingsPlugin} in the application metadata. * * @param app * the app * @param plugin * the plugin */ public void set(final Application app, final SecuritySettingsPlugin plugin) { app.setMetaData(SECURITY_SETTINGS_PLUGIN_KEY, plugin); }
/** * Binds this configuration to the application instance * * @param application */ public void configure(Application application) { application.setMetaData(KEY, this); }
/** * Sets the given http2 settings to the given application * * @param application * the application to set the meta data key to * @param settings * the http2 settings to be set to the application */ public static void set(Application application, Http2Settings settings) { application.setMetaData(KEY, settings); } }
public static void setContributors(List<IDebugBarContributor> contributors, Application application) { Args.notNull(application, "application"); application.setMetaData(CONTRIBS_META_KEY, contributors); } }
public static void setContributors(List<IDebugBarContributor> contributors, Application application) { Args.notNull(application, "application"); application.setMetaData(CONTRIBS_META_KEY, contributors); } }
public synchronized static void setViolationMessageRenderer(final ViolationMessageRenderer renderer) { Assert.parameterNotNull(renderer, "renderer"); final Application app = Application.get(); app.setMetaData(violationMessageRendererKey, renderer); }
private static void touch(final Application application, String id) { id = getPageId(application, id); ConcurrentMap<String, Time> eventsTimeById; synchronized (application) { eventsTimeById = application.getMetaData(EVENTS_KEY); if (eventsTimeById == null) { eventsTimeById = new ConcurrentHashMap<String, Time>(); application.setMetaData(EVENTS_KEY, eventsTimeById); } } eventsTimeById.put(id, Time.now()); }
public synchronized static void setViolationMessageRenderer( final ViolationMessageRenderer renderer) { Assert.parameterNotNull(renderer, "renderer"); final Application app = Application.get(); app.setMetaData(violationMessageRendererKey, renderer); }
/** * Not to be used by Component authors. This should be used as an application-wide setting for * which providers to use. If set, it will be applied instead of the providers passed * * @param app * @param providers */ public static void setOverrideProviders(final Application app, final Provider... providers) { Assert.parameterNotNull(app, "app"); Assert.parameterNotNull(providers, "providers"); app.setMetaData(PROVIDER_KEY, providers); }
public void init(Application application) { ISessionStore store = application.getSessionStore(); store.registerBindListener(this); store.registerUnboundListener(this); application.setMetaData(SCRIPT_EXECUTOR_HOLDER, this); }
@Override public void init(Application application) { application.setMetaData(MonitoringRepositoryKey.KEY, new JamonRepository()); application.getRequestCycleListeners() .add(new JamonAwareRequestCycleListener(application, true)); }
@Override public void init(Application application) { // create dashboard context DashboardContext dashboardContext = new DashboardContext(); // store dashboard context in application application.setMetaData(DASHBOARD_CONTEXT_KEY, dashboardContext); // add dashboard context injector DashboardContextInjector dashboardContextInjector = new DashboardContextInjector(dashboardContext); application.getComponentInstantiationListeners().add(dashboardContextInjector); }
@Override public void init(Application application) { // create dashboard context DashboardContext dashboardContext = new DashboardContext(); // store dashboard context in application application.setMetaData(DASHBOARD_CONTEXT_KEY, dashboardContext); // add dashboard context injector DashboardContextInjector dashboardContextInjector = new DashboardContextInjector(dashboardContext); application.getComponentInstantiationListeners().add(dashboardContextInjector); }
@Override public void init(final Application application) { AnnotationEventDispatcherConfig config = new AnnotationEventDispatcherConfig(); application.setMetaData(ANNOTATION_EVENT_DISPATCHER_CONFIG_CONTEXT_KEY, config); AnnotationEventDispatcher dispatcher = new AnnotationEventDispatcher(); application.getComponentInstantiationListeners().add(dispatcher); application.getFrameworkSettings().add(dispatcher); }