congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RepositoryConfig.getHost
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • putExtra (Intent)
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now