diff --git a/src/main/java/org/elasticsearch/action/support/DelegatingActionListener.java b/src/main/java/org/elasticsearch/action/support/DelegatingActionListener.java index 21980e79225..9e7c2205270 100644 --- a/src/main/java/org/elasticsearch/action/support/DelegatingActionListener.java +++ b/src/main/java/org/elasticsearch/action/support/DelegatingActionListener.java @@ -22,7 +22,6 @@ */ package org.elasticsearch.action.support; -import org.elasticsearch.ElasticsearchIllegalStateException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionResponse; @@ -30,15 +29,11 @@ public abstract class DelegatingActionListener delegatedActionListener; - private DelegatingActionListener(){ - throw new ElasticsearchIllegalStateException("Constructor for " + DelegatingActionListener.class.toString() + " can't be called."); - } - - public DelegatingActionListener(final ActionListener listener) { + protected DelegatingActionListener(final ActionListener listener) { this.delegatedActionListener = listener; } - public abstract Delegated getDelegatedFromInstigator(Instigator response); + protected abstract Delegated getDelegatedFromInstigator(Instigator response); @Override public final void onResponse(Instigator response) {