@Override
final ClientActorBehavior onReceiveCommand(final Object command) {
- if (command instanceof RequestFailure) {
+ if (command instanceof InternalCommand) {
+ return ((InternalCommand) command).execute();
+ } else if (command instanceof RequestFailure) {
final RequestFailure<?, ?> failure = (RequestFailure<?, ?>) command;
final RequestException cause = failure.getCause();
if (cause instanceof RetiredGenerationException) {
* @return Next behavior to use, null if this actor should shut down.
*/
protected abstract @Nullable ClientActorBehavior onCommand(@Nonnull Object command);
+
+ /**
+ * Override this method to provide a backend resolver instance.
+ *
+ * @return
+ */
+ protected abstract @Nonnull BackendInfoResolver<?> resolver();
}