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

How to use
EurekaProtocolError
in
com.netflix.eureka2.protocol

Best Java code snippets using com.netflix.eureka2.protocol.EurekaProtocolError (Showing top 6 results out of 315)

origin: com.netflix.eureka/eureka2-write-server

sendErrorOnTransport(new EurekaProtocolError("Unexpected message " + message));
origin: com.netflix.eureka/eureka2-write-server

protected void dispatchMessageFromClient(final Object message) {
  Observable<?> reply;
  if (message instanceof ReplicationHello) {
    logger.info("Received Hello from {}", ((ReplicationHello) message).getSourceId());
    reply = hello((ReplicationHello) message);
  } else if (message instanceof RegisterCopy) {
    InstanceInfo instanceInfo = ((RegisterCopy) message).getInstanceInfo();
    reply = register(instanceInfo);// No need to subscribe, the register() call does the subscription.
  } else if (message instanceof UnregisterCopy) {
    reply = unregister(((UnregisterCopy) message).getInstanceId());// No need to subscribe, the unregister() call does the subscription.
  } else {
    reply = Observable.error(new EurekaProtocolError("Unexpected message " + message));
  }
  reply.ignoreElements().cast(Void.class).subscribe(new Subscriber<Void>() {
    @Override
    public void onCompleted() {
      // No-op
    }
    @Override
    public void onError(Throwable e) {
      sendErrorOnTransport(e);
    }
    @Override
    public void onNext(Void aVoid) {
      // No-op
    }
  });
}
origin: com.netflix.eureka2/eureka-server

sendErrorOnTransport(new EurekaProtocolError("Unexpected message " + message));
origin: com.netflix.eureka2/eureka-write-server

  @Override
  public void call(Object message) {
    if (message instanceof Register) {
      InstanceInfo instanceInfo = ((Register) message).getInstanceInfo();
      register(instanceInfo);// No need to subscribe, the register() call does the subscription.
    } else if (message instanceof Unregister) {
      unregister();// No need to subscribe, the unregister() call does the subscription.
    } else if (message instanceof Update) {
      InstanceInfo instanceInfo = ((Update) message).getInstanceInfo();
      update(instanceInfo);// No need to subscribe, the update() call does the subscription.
    } else {
      sendErrorOnTransport(new EurekaProtocolError("Unexpected message " + message));
    }
  }
});
origin: com.netflix.eureka/eureka2-server

sendErrorOnTransport(new EurekaProtocolError("Unexpected message " + message));
origin: com.netflix.eureka2/eureka-write-server

protected void dispatchMessageFromClient(final Object message) {
  Observable<?> reply;
  if (message instanceof ReplicationHello) {
    reply = hello((ReplicationHello) message);
  } else if (message instanceof RegisterCopy) {
    InstanceInfo instanceInfo = ((RegisterCopy) message).getInstanceInfo();
    reply = register(instanceInfo);// No need to subscribe, the register() call does the subscription.
  } else if (message instanceof UnregisterCopy) {
    reply = unregister(((UnregisterCopy) message).getInstanceId());// No need to subscribe, the unregister() call does the subscription.
  } else if (message instanceof UpdateCopy) {
    InstanceInfo instanceInfo = ((UpdateCopy) message).getInstanceInfo();
    reply = update(instanceInfo);// No need to subscribe, the update() call does the subscription.
  } else {
    reply = Observable.error(new EurekaProtocolError("Unexpected message " + message));
  }
  reply.ignoreElements().cast(Void.class).subscribe(new Subscriber<Void>() {
    @Override
    public void onCompleted() {
      // No-op
    }
    @Override
    public void onError(Throwable e) {
      sendErrorOnTransport(e);
    }
    @Override
    public void onNext(Void aVoid) {
      // No-op
    }
  });
}
com.netflix.eureka2.protocolEurekaProtocolError

Javadoc

Exception used to communicate Eureka protocol level errors, like unexpected message received, invalid order of messages, etc. Transport layer errors are excluded from it.

Most used methods

  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Path (java.nio.file)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Top Sublime Text plugins
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