/** * Get the name of the Jersey application. * * @return Name of the application. * @see #setApplicationName(String) */ public String getApplicationName() { return state.getApplicationName(); }
/** * Get the name of the Jersey application. * * @return Name of the application. * @see #setApplicationName(String) */ public String getApplicationName() { return state.getApplicationName(); }
this.applicationName = resourceConfig.getApplicationName(); this.applicationClass = resourceConfig.getApplication().getClass().getName(); this.configurationProperties = new HashMap<>();
this.applicationName = resourceConfig.getApplicationName(); this.applicationClass = resourceConfig.getApplication().getClass().getName(); this.configurationProperties = new HashMap<>();
private void setupApplicationName() { final String appName = ServerProperties.getValue(getProperties(), ServerProperties.APPLICATION_NAME, null, String.class); if (appName != null && getApplicationName() == null) { setApplicationName(appName); } } }
private void setupApplicationName() { final String appName = ServerProperties.getValue(getProperties(), ServerProperties.APPLICATION_NAME, null, String.class); if (appName != null && getApplicationName() == null) { setApplicationName(appName); } } }
/** * Get the name of the Jersey application. * * @return Name of the application. * @see #setApplicationName(String) */ public String getApplicationName() { return state.getApplicationName(); }
@Override public void onStatistics(MonitoringStatistics statistics) { if (domain == null) { final String globalSubType = ",subType=" + PROPERTY_SUBTYPE_GLOBAL; final ApplicationInfo appStats = applicationInfoProvider.get(); String appName = appStats.getResourceConfig().getApplicationName(); if (appName == null) { appName = "App_" + Integer.toHexString(appStats.getResourceConfig().hashCode()); } domain = "org.glassfish.jersey:type=" + appName; unregisterJerseyMBeans(false); uriStatsGroup = new ResourcesMBeanGroup(statistics.getUriStatistics(), true, this, ",subType=Uris"); Map<String, ResourceStatistics> newMap = transformToStringKeys(statistics.getResourceClassStatistics()); resourceClassStatsGroup = new ResourcesMBeanGroup(newMap, false, this, ",subType=Resources"); responseMXBean = new ResponseMXBeanImpl(); registerMBean(responseMXBean, globalSubType + ",global=Responses"); requestMBean = new ExecutionStatisticsDynamicBean(statistics.getRequestStatistics(), this, globalSubType, "AllRequestTimes"); exceptionMapperMXBean = new ExceptionMapperMXBeanImpl(statistics.getExceptionMapperStatistics(), this, globalSubType); new ApplicationMXBeanImpl(appStats, this, globalSubType); } requestMBean.updateExecutionStatistics(statistics.getRequestStatistics()); uriStatsGroup.updateResourcesStatistics(statistics.getUriStatistics()); responseMXBean.updateResponseStatistics(statistics.getResponseStatistics()); exceptionMapperMXBean.updateExceptionMapperStatistics(statistics.getExceptionMapperStatistics()); this.resourceClassStatsGroup.updateResourcesStatistics(transformToStringKeys(statistics.getResourceClassStatistics())); }
@Override public void onStatistics(MonitoringStatistics statistics) { if (domain == null) { final String globalSubType = ",subType=" + PROPERTY_SUBTYPE_GLOBAL; final ApplicationInfo appStats = applicationInfoProvider.get(); String appName = appStats.getResourceConfig().getApplicationName(); if (appName == null) { appName = "App_" + Integer.toHexString(appStats.getResourceConfig().hashCode()); } domain = "org.glassfish.jersey:type=" + appName; unregisterJerseyMBeans(false); uriStatsGroup = new ResourcesMBeanGroup(statistics.getUriStatistics(), true, this, ",subType=Uris"); Map<String, ResourceStatistics> newMap = transformToStringKeys(statistics.getResourceClassStatistics()); resourceClassStatsGroup = new ResourcesMBeanGroup(newMap, false, this, ",subType=Resources"); responseMXBean = new ResponseMXBeanImpl(); registerMBean(responseMXBean, globalSubType + ",global=Responses"); requestMBean = new ExecutionStatisticsDynamicBean(statistics.getRequestStatistics(), this, globalSubType, "AllRequestTimes"); exceptionMapperMXBean = new ExceptionMapperMXBeanImpl(statistics.getExceptionMapperStatistics(), this, globalSubType); new ApplicationMXBeanImpl(appStats, this, globalSubType); } requestMBean.updateExecutionStatistics(statistics.getRequestStatistics()); uriStatsGroup.updateResourcesStatistics(statistics.getUriStatistics()); responseMXBean.updateResponseStatistics(statistics.getResponseStatistics()); exceptionMapperMXBean.updateExceptionMapperStatistics(statistics.getExceptionMapperStatistics()); this.resourceClassStatsGroup.updateResourcesStatistics(transformToStringKeys(statistics.getResourceClassStatistics())); }
/** * Merges fields (e.g. custom binders, properties) of the given application with this application. * <p> * The merging should be done because of the possibility of reloading this {@code ResourceConfig} in a container * so this resource config should know about custom binders and properties of the underlying application to ensure * the reload process will complete successfully. * </p> * * @param application the application which fields should be merged with this application. * @see org.glassfish.jersey.server.spi.Container#reload() * @see org.glassfish.jersey.server.spi.Container#reload(ResourceConfig) */ private void mergeApplications(final Application application) { if (application instanceof ResourceConfig) { // Merge custom binders. final ResourceConfig rc = (ResourceConfig) application; // Merge resources super.registerResources(rc.getResources()); // properties set on the wrapping resource config take precedence // (as those are retrieved from the web.xml, for example) rc.invalidateCache(); rc.addProperties(super.getProperties()); super.addProperties(rc.getProperties()); super.setApplicationName(rc.getApplicationName()); super.setClassLoader(rc.getClassLoader()); rc.lock(); } else if (application != null) { super.addProperties(application.getProperties()); } }
/** * Merges fields (e.g. custom binders, properties) of the given application with this application. * <p> * The merging should be done because of the possibility of reloading this {@code ResourceConfig} in a container * so this resource config should know about custom binders and properties of the underlying application to ensure * the reload process will complete successfully. * </p> * * @param application the application which fields should be merged with this application. * @see org.glassfish.jersey.server.spi.Container#reload() * @see org.glassfish.jersey.server.spi.Container#reload(ResourceConfig) */ private void mergeApplications(final Application application) { if (application instanceof ResourceConfig) { // Merge custom binders. final ResourceConfig rc = (ResourceConfig) application; // Merge resources super.registerResources(rc.getResources()); // properties set on the wrapping resource config take precedence // (as those are retrieved from the web.xml, for example) rc.invalidateCache(); rc.addProperties(super.getProperties()); super.addProperties(rc.getProperties()); super.setApplicationName(rc.getApplicationName()); super.setClassLoader(rc.getClassLoader()); rc.lock(); } else if (application != null) { super.addProperties(application.getProperties()); } }
private void setupApplicationName() { final String appName = ServerProperties.getValue(getProperties(), ServerProperties.APPLICATION_NAME, null, String.class); if (appName != null && getApplicationName() == null) { setApplicationName(appName); } } }
this.applicationName = resourceConfig.getApplicationName(); this.applicationClass = resourceConfig.getApplication().getClass().getName(); this.configurationProperties = new HashMap<>();
/** * Get the name of the Jersey application. * * @return Name of the application. * @see #setApplicationName(String) */ public String getApplicationName() { return state.getApplicationName(); }
/** * Get the name of the Jersey application. * * @return Name of the application. * @see #setApplicationName(String) */ public String getApplicationName() { return state.getApplicationName(); }
/** * <p>getApplicationName.</p> * * @return a {@link java.lang.String} object. */ public String getApplicationName() { return config.getApplicationName(); }
@Override public void onStatistics(MonitoringStatistics statistics) { if (domain == null) { final String globalSubType = ",subType=" + PROPERTY_SUBTYPE_GLOBAL; final ApplicationInfo appStats = applicationInfoProvider.get(); String appName = appStats.getResourceConfig().getApplicationName(); if (appName == null) { appName = "App_" + Integer.toHexString(appStats.getResourceConfig().hashCode()); } domain = "org.glassfish.jersey:type=" + appName; unregisterJerseyMBeans(false); uriStatsGroup = new ResourcesMBeanGroup(statistics.getUriStatistics(), true, this, ",subType=Uris"); Map<String, ResourceStatistics> newMap = transformToStringKeys(statistics.getResourceClassStatistics()); resourceClassStatsGroup = new ResourcesMBeanGroup(newMap, false, this, ",subType=Resources"); responseMXBean = new ResponseMXBeanImpl(); registerMBean(responseMXBean, globalSubType + ",global=Responses"); requestMBean = new ExecutionStatisticsDynamicBean(statistics.getRequestStatistics(), this, globalSubType, "AllRequestTimes"); exceptionMapperMXBean = new ExceptionMapperMXBeanImpl(statistics.getExceptionMapperStatistics(), this, globalSubType); new ApplicationMXBeanImpl(appStats, this, globalSubType); } requestMBean.updateExecutionStatistics(statistics.getRequestStatistics()); uriStatsGroup.updateResourcesStatistics(statistics.getUriStatistics()); responseMXBean.updateResponseStatistics(statistics.getResponseStatistics()); exceptionMapperMXBean.updateExceptionMapperStatistics(statistics.getExceptionMapperStatistics()); this.resourceClassStatsGroup.updateResourcesStatistics(transformToStringKeys(statistics.getResourceClassStatistics())); }
/** * Merges fields (e.g. custom binders, properties) of the given application with this application. * <p> * The merging should be done because of the possibility of reloading this {@code ResourceConfig} in a container * so this resource config should know about custom binders and properties of the underlying application to ensure * the reload process will complete successfully. * </p> * * @param application the application which fields should be merged with this application. * @see org.glassfish.jersey.server.spi.Container#reload() * @see org.glassfish.jersey.server.spi.Container#reload(ResourceConfig) */ private void mergeApplications(final Application application) { if (application instanceof ResourceConfig) { // Merge custom binders. final ResourceConfig rc = (ResourceConfig) application; // Merge resources super.registerResources(rc.getResources()); // properties set on the wrapping resource config take precedence // (as those are retrieved from the web.xml, for example) rc.invalidateCache(); rc.addProperties(super.getProperties()); super.addProperties(rc.getProperties()); super.setApplicationName(rc.getApplicationName()); super.setClassLoader(rc.getClassLoader()); rc.lock(); } else if (application != null) { super.addProperties(application.getProperties()); } }
private void setupApplicationName() { final String appName = ServerProperties.getValue(getProperties(), ServerProperties.APPLICATION_NAME, null, String.class); if (appName != null && getApplicationName() == null) { setApplicationName(appName); } } }
private void setupApplicationName() { final String appName = ServerProperties.getValue(getProperties(), ServerProperties.APPLICATION_NAME, null, String.class); if (appName != null && getApplicationName() == null) { setApplicationName(appName); } } }