Class CapturingActionListener<T>

java.lang.Object
org.elasticsearch.xpack.security.support.CapturingActionListener<T>
Type Parameters:
T - Response class
All Implemented Interfaces:
org.elasticsearch.action.ActionListener<T>

public class CapturingActionListener<T> extends Object implements org.elasticsearch.action.ActionListener<T>
Simple implementation of ActionListener to capture response or exception. Allowed a caller to pass this listener and get a response.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.action.ActionListener

    org.elasticsearch.action.ActionListener.Delegating<Response extends Object,DelegateResponse extends Object>, org.elasticsearch.action.ActionListener.DelegatingActionListener<T extends Object>, org.elasticsearch.action.ActionListener.DelegatingFailureActionListener<T extends Object,R extends Object>, org.elasticsearch.action.ActionListener.MappedActionListener<Response extends Object,MappedResponse extends Object>, org.elasticsearch.action.ActionListener.RunAfterActionListener<T extends Object>, org.elasticsearch.action.ActionListener.RunBeforeActionListener<T extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    void
    onFailure(Exception exception)
     
    void
    onResponse(T result)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.action.ActionListener

    delegateFailure, delegateResponse, map
  • Constructor Details

    • CapturingActionListener

      public CapturingActionListener()
  • Method Details

    • onResponse

      public void onResponse(T result)
      Specified by:
      onResponse in interface org.elasticsearch.action.ActionListener<T>
    • onFailure

      public void onFailure(Exception exception)
      Specified by:
      onFailure in interface org.elasticsearch.action.ActionListener<T>
    • getResponse

      public T getResponse()
    • getFailure

      public Exception getFailure()