Codota Logo
ConfigurationResolver.getJmxMonitoringAppliers
Code IndexAdd Codota to your IDE (free)

How to use
getJmxMonitoringAppliers
method
in
rocks.inspectit.server.instrumentation.config.ConfigurationResolver

Best Java code snippets using rocks.inspectit.server.instrumentation.config.ConfigurationResolver.getJmxMonitoringAppliers (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

@Test
public void nullEnvironment() {
  Collection<JmxMonitoringApplier> jmxMonitoringAppliers = configurationResolver.getJmxMonitoringAppliers(null);
  assertThat(jmxMonitoringAppliers, is(empty()));
  verifyZeroInteractions(configurationInterfaceManager);
}
origin: inspectIT/inspectIT

@Test
public void noProfile() {
  when(environment.getProfileIds()).thenReturn(Collections.<String> emptySet());
  Collection<JmxMonitoringApplier> jmxMonitoringAppliers = configurationResolver.getJmxMonitoringAppliers(environment);
  assertThat(jmxMonitoringAppliers, is(empty()));
}
origin: inspectIT/inspectIT

/**
 * Updates the defined configuration in the holder with following tasks:<br>
 * 1. Creates the new {@link #agentConfiguration} for given environment and platform id<br>
 * 2. Resolves all {@link #instrumentationAppliers} for given environment<br>
 * 3. sets the passes environment to the holder.
 * <p>
 * If <code>null</code> is passed then everything saved in the holder will be reset to
 * <code>null</code> as well.
 *
 * @param environment
 *            Environment to update the configuration and appliers with.
 * @param platformId
 *            Agent id needed for resolving configuration.
 */
public void update(Environment environment, long platformId) {
  if (null != environment) {
    this.environment = environment;
    this.agentConfiguration = configurationCreator.environmentToConfiguration(environment, platformId);
    this.instrumentationAppliers = configurationResolver.getInstrumentationAppliers(environment);
    this.jmxMonitoringAppliers = configurationResolver.getJmxMonitoringAppliers(environment);
  } else {
    this.environment = null; // NOPMD
    this.agentConfiguration = null; // NOPMD
    this.instrumentationAppliers = null; // NOPMD
    this.jmxMonitoringAppliers = null; // NOPMD
  }
}
origin: inspectIT/inspectIT

@Test
public void profileDoesNotExists() throws BusinessException {
  when(environment.getProfileIds()).thenReturn(Collections.singleton(PROFILE_ID));
  when(configurationInterfaceManager.getProfile(PROFILE_ID)).thenThrow(new BusinessException(null));
  Collection<JmxMonitoringApplier> jmxMonitoringAppliers = configurationResolver.getJmxMonitoringAppliers(environment);
  assertThat(jmxMonitoringAppliers, is(empty()));
}
origin: inspectIT/inspectIT

@Test
public void nullDataFromProfile() throws BusinessException {
  when(environment.getProfileIds()).thenReturn(Collections.singleton(PROFILE_ID));
  when(configurationInterfaceManager.getProfile(PROFILE_ID)).thenReturn(profile);
  doReturn(jmxDefinitionProfileData).when(profile).getProfileData();
  when(jmxDefinitionProfileData.getData(JmxDefinitionProfileData.class)).thenReturn(null);
  when(profile.isActive()).thenReturn(true);
  Collection<JmxMonitoringApplier> jmxMonitoringAppliers = configurationResolver.getJmxMonitoringAppliers(environment);
  assertThat(jmxMonitoringAppliers, is(empty()));
}
origin: inspectIT/inspectIT

@Test
public void profileNotActive() throws BusinessException {
  when(environment.getProfileIds()).thenReturn(Collections.singleton(PROFILE_ID));
  when(configurationInterfaceManager.getProfile(PROFILE_ID)).thenReturn(profile);
  doReturn(jmxDefinitionProfileData).when(profile).getProfileData();
  when(jmxDefinitionProfileData.getData(JmxDefinitionProfileData.class)).thenReturn(Collections.singletonList(jmxAssignment));
  when(profile.isActive()).thenReturn(false);
  Collection<JmxMonitoringApplier> jmxMonitoringAppliers = configurationResolver.getJmxMonitoringAppliers(environment);
  assertThat(jmxMonitoringAppliers, is(empty()));
}
origin: inspectIT/inspectIT

@Test
public void applier() throws BusinessException {
  when(environment.getProfileIds()).thenReturn(Collections.singleton(PROFILE_ID));
  when(configurationInterfaceManager.getProfile(PROFILE_ID)).thenReturn(profile);
  doReturn(jmxDefinitionProfileData).when(profile).getProfileData();
  when(jmxDefinitionProfileData.getData(JmxDefinitionProfileData.class)).thenReturn(Collections.singletonList(jmxAssignment));
  when(profile.isActive()).thenReturn(true);
  Collection<JmxMonitoringApplier> jmxMonitoringAppliers = configurationResolver.getJmxMonitoringAppliers(environment);
  assertThat(jmxMonitoringAppliers, hasSize(1));
  assertThat(jmxMonitoringAppliers.iterator().next().getJmxSensorAssignment(), is(jmxAssignment));
}
origin: inspectIT/inspectIT

@Test
public void wrongProfileData() throws BusinessException {
  when(environment.getProfileIds()).thenReturn(Collections.singleton(PROFILE_ID));
  when(configurationInterfaceManager.getProfile(PROFILE_ID)).thenReturn(profile);
  doReturn(new SensorAssignmentProfileData()).when(profile).getProfileData();
  when(profile.isActive()).thenReturn(true);
  Collection<JmxMonitoringApplier> jmxMonitoringAppliers = configurationResolver.getJmxMonitoringAppliers(environment);
  assertThat(jmxMonitoringAppliers, is(empty()));
}
origin: inspectIT/inspectIT

  @Test
  public void updateReset() {
    long platformId = 11;
    Environment environment = mock(Environment.class);
    AgentConfig configuration = mock(AgentConfig.class);
    IInstrumentationApplier applier = mock(IInstrumentationApplier.class);
    JmxMonitoringApplier jmxApplier = mock(JmxMonitoringApplier.class);
    when(configurationCreator.environmentToConfiguration(environment, platformId)).thenReturn(configuration);
    when(configurationResolver.getInstrumentationAppliers(environment)).thenReturn(Collections.singleton(applier));
    when(configurationResolver.getJmxMonitoringAppliers(environment)).thenReturn(Collections.singleton(jmxApplier));
    holder.update(environment, platformId);
    holder.update(null, platformId);
    assertThat(holder.isInitialized(), is(false));
    // only one time verifications
    verify(configurationCreator).environmentToConfiguration(environment, platformId);
    verify(configurationResolver).getInstrumentationAppliers(environment);
    verify(configurationResolver).getJmxMonitoringAppliers(environment);
    verifyNoMoreInteractions(configurationCreator, configurationResolver);
  }
}
origin: inspectIT/inspectIT

@Test
public void update() {
  long platformId = 11;
  Environment environment = mock(Environment.class);
  AgentConfig configuration = mock(AgentConfig.class);
  IInstrumentationApplier applier = mock(IInstrumentationApplier.class);
  JmxMonitoringApplier jmxApplier = mock(JmxMonitoringApplier.class);
  when(configurationCreator.environmentToConfiguration(environment, platformId)).thenReturn(configuration);
  when(configurationResolver.getInstrumentationAppliers(environment)).thenReturn(Collections.singleton(applier));
  when(configurationResolver.getJmxMonitoringAppliers(environment)).thenReturn(Collections.singleton(jmxApplier));
  holder.update(environment, platformId);
  assertThat(holder.isInitialized(), is(true));
  assertThat(holder.getEnvironment(), is(environment));
  assertThat(holder.getAgentConfiguration(), is(configuration));
  assertThat(holder.getInstrumentationAppliers(), hasSize(1));
  assertThat(holder.getInstrumentationAppliers(), hasItem(applier));
  assertThat(holder.getJmxMonitoringAppliers(), hasSize(1));
  assertThat(holder.getJmxMonitoringAppliers(), hasItem(jmxApplier));
  verify(configurationCreator).environmentToConfiguration(environment, platformId);
  verify(configurationResolver).getInstrumentationAppliers(environment);
  verify(configurationResolver).getJmxMonitoringAppliers(environment);
  verifyNoMoreInteractions(configurationCreator, configurationResolver);
}
rocks.inspectit.server.instrumentation.configConfigurationResolvergetJmxMonitoringAppliers

Javadoc

Returns all JMX monitoring appliers for one environment.

Popular methods of ConfigurationResolver

  • getAllExcludeRules
    Returns all ExcludeRules contained in all profiles for the given environment.
  • getEnvironmentForAgent
    Tries to locate one Environment for the given agent name and IPs. If only one Environment fits the a
  • getInstrumentationApplier
    Returns the IInstrumentationApplier for the given sensor assignment and the Environment it's being u
  • getInstrumentationAppliers
    Returns all instrumentation appliers for one environment.
  • getConfigurationInfo
    Returns the configuration info based on the given Environment.
  • matches
    Checks if the specified AgentMapping is matching the agent name and IPs.

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • getApplicationContext (Context)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • BoxLayout (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now