Tabnine Logo
SelfInfoResolverChain
Code IndexAdd Tabnine to your IDE (free)

How to use
SelfInfoResolverChain
in
com.netflix.eureka2.server.service

Best Java code snippets using com.netflix.eureka2.server.service.SelfInfoResolverChain (Showing top 4 results out of 315)

origin: com.netflix.eureka/eureka2-server

public SelfInfoResolverChain(ChainableSelfInfoResolver... resolvers) {
  super(Observable.combineLatest(getObservableList(resolvers), new FuncN<InstanceInfo.Builder>() {
        @Override
        public InstanceInfo.Builder call(Object... args) {
          InstanceInfo.Builder seed = new InstanceInfo.Builder();
          for (Object obj : args) {
            InstanceInfo.Builder builder = (InstanceInfo.Builder) obj;
            seed.withBuilder(new InstanceInfo.Builder().withBuilder(builder));  // clone at each step
          }
          return seed;
        }
      })
  );
}
origin: com.netflix.eureka/eureka2-dashboard

@Inject
public DashboardServerSelfInfoResolver(final EurekaCommonConfig config, final WebSocketServer webSocketServer) {
  SelfInfoResolverChain resolverChain = new SelfInfoResolverChain(
      new ConfigSelfInfoResolver(config),
      // dashboard server specific resolver
      new ChainableSelfInfoResolver(Observable.just(new HashSet<ServicePort>())
          .map(new Func1<HashSet<ServicePort>, Builder>() {
            @Override
            public InstanceInfo.Builder call(HashSet<ServicePort> ports) {
              ports.add(new ServicePort(WEB_SOCKET_SERVICE, webSocketServer.serverPort(), false));
              return new InstanceInfo.Builder().withPorts(ports);
            }
          })
      ),
      new PeriodicDataCenterInfoResolver(config),
      // TODO override with more meaningful health check
      new ChainableSelfInfoResolver(Observable.just(new InstanceInfo.Builder().withStatus(InstanceInfo.Status.UP)))
  );
  this.delegate = new CachingSelfInfoResolver(resolverChain);
}
origin: com.netflix.eureka/eureka2-bridge

@Inject
public EurekaBridgeServerSelfInfoResolver(
    final EurekaServerConfig config,
    final TcpDiscoveryServer discoveryServer)
{
  SelfInfoResolverChain resolverChain = new SelfInfoResolverChain(
      new ConfigSelfInfoResolver(config),
      // read server specific resolver
      new ChainableSelfInfoResolver(Observable.just(new HashSet<ServicePort>())
          .map(new Func1<HashSet<ServicePort>, InstanceInfo.Builder>() {
            @Override
            public InstanceInfo.Builder call(HashSet<ServicePort> ports) {
              ports.add(new ServicePort(Names.DISCOVERY, discoveryServer.serverPort(), false));
              return new InstanceInfo.Builder().withPorts(ports);
            }
          })
      ),
      new PeriodicDataCenterInfoResolver(config),
      // TODO override with more meaningful health check
      new ChainableSelfInfoResolver(Observable.just(new InstanceInfo.Builder().withStatus(InstanceInfo.Status.UP)))
  );
  delegate = new CachingSelfInfoResolver(resolverChain);
}
origin: com.netflix.eureka/eureka2-write-server

@Inject
public EurekaWriteServerSelfInfoResolver(
    final EurekaServerConfig config,
    final EurekaHttpServer httpServer,
    final TcpRegistrationServer registrationServer,
    final TcpReplicationServer replicationServer,
    final TcpDiscoveryServer discoveryServer) {
  SelfInfoResolverChain resolverChain = new SelfInfoResolverChain(
      new ConfigSelfInfoResolver(config),
      // write server specific resolver
      new ChainableSelfInfoResolver(Observable.just(new HashSet<ServicePort>())
          .map(new Func1<HashSet<ServicePort>, InstanceInfo.Builder>() {
            @Override
            public InstanceInfo.Builder call(HashSet<ServicePort> ports) {
              ports.add(new ServicePort(Names.EUREKA_HTTP, httpServer.serverPort(), false));
              ports.add(new ServicePort(Names.REGISTRATION, registrationServer.serverPort(), false));
              ports.add(new ServicePort(Names.REPLICATION, replicationServer.serverPort(), false));
              ports.add(new ServicePort(Names.DISCOVERY, discoveryServer.serverPort(), false));
              return new InstanceInfo.Builder().withPorts(ports);
            }
          })
      ),
      new PeriodicDataCenterInfoResolver(config),
      // TODO override with more meaningful health check
      new ChainableSelfInfoResolver(Observable.just(new InstanceInfo.Builder().withStatus(InstanceInfo.Status.UP)))
  );
  delegate = new CachingSelfInfoResolver(resolverChain);
}
com.netflix.eureka2.server.serviceSelfInfoResolverChain

Most used methods

  • <init>
  • getObservableList

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JCheckBox (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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