Codota Logo
RepositoryConfig.getHost
Code IndexAdd Codota to your IDE (free)

How to use
getHost
method
in
rocks.inspectit.agent.java.config.impl.RepositoryConfig

Best Java code snippets using rocks.inspectit.agent.java.config.impl.RepositoryConfig.getHost (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

/**
 * Establish the connection to the server.
 *
 * @exception ConnectException
 *                Throws a ConnectException if there was a problem connecting to the repository.
 */
private void connect() throws ConnectException {
  RepositoryConfig repositoryConfig = configurationStorage.getRepositoryConfig();
  connection.connect(repositoryConfig.getHost(), repositoryConfig.getPort());
}
origin: inspectIT/inspectIT

@Test
public void repositoryOnlySet() throws Exception {
  Properties properties = System.getProperties();
  properties.remove(ConfigurationStorage.AGENT_NAME_PROPERTY);
  properties.put(ConfigurationStorage.REPOSITORY_PROPERTY, "localhost:8000");
  configurationStorage.afterPropertiesSet();
  assertThat(configurationStorage.getRepositoryConfig().getHost(), is("localhost"));
  assertThat(configurationStorage.getRepositoryConfig().getPort(), is(8000));
  assertThat(configurationStorage.getAgentName(), is(not(nullValue())));
}
origin: inspectIT/inspectIT

@Test
public void check() throws StorageException {
  configurationStorage.setRepository("localhost", 1099);
  String host = configurationStorage.getRepositoryConfig().getHost();
  int port = configurationStorage.getRepositoryConfig().getPort();
  assertThat(host, is(equalTo("localhost")));
  assertThat(port, is(equalTo(1099)));
}
origin: inspectIT/inspectIT

@Test
public void repositoryAndAgentNameSet() throws Exception {
  String agentName = "agentName";
  Properties properties = System.getProperties();
  properties.put(ConfigurationStorage.REPOSITORY_PROPERTY, "localhost:8000");
  properties.put(ConfigurationStorage.AGENT_NAME_PROPERTY, agentName);
  configurationStorage.afterPropertiesSet();
  assertThat(configurationStorage.getRepositoryConfig().getHost(), is("localhost"));
  assertThat(configurationStorage.getRepositoryConfig().getPort(), is(8000));
  assertThat(configurationStorage.getAgentName(), is(agentName));
}
origin: inspectIT/inspectIT

  @Test
  public void resetNotAllowed() throws StorageException {
    configurationStorage.setRepository("localhost", 1099);
    configurationStorage.setRepository("localhost1", 1200);
    String host = configurationStorage.getRepositoryConfig().getHost();
    int port = configurationStorage.getRepositoryConfig().getPort();
    assertThat(host, is(equalTo("localhost")));
    assertThat(port, is(equalTo(1099)));
  }
}
origin: inspectIT/inspectIT

@Test
public void connectAndRetrievePlatformId() throws Exception {
  String host = "localhost";
  int port = 1099;
  RepositoryConfig repositoryConfig = mock(RepositoryConfig.class);
  when(repositoryConfig.getHost()).thenReturn(host);
  when(repositoryConfig.getPort()).thenReturn(port);
  when(configurationStorage.getRepositoryConfig()).thenReturn(repositoryConfig);
  when(configurationStorage.getAgentName()).thenReturn("testAgent");
  when(versionService.getVersionAsString()).thenReturn("dummyVersion");
  long fakePlatformId = 7L;
  when(connection.isConnected()).thenReturn(false);
  when(connection.register("testAgent", "dummyVersion")).thenReturn(agentConfiguration);
  when(agentConfiguration.getPlatformId()).thenReturn(fakePlatformId);
  platformManager.afterPropertiesSet();
  long platformId = platformManager.getPlatformId();
  assertThat(platformId, is(equalTo(fakePlatformId)));
  verify(connection, times(1)).connect(host, port);
}
rocks.inspectit.agent.java.config.implRepositoryConfiggetHost

Javadoc

Returns the name / ip of the host.

Popular methods of RepositoryConfig

  • getPort
    Returns the port of the host.
  • <init>
    Default constructor accepting two parameters.

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • JFrame (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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