Package org.elasticsearch.action
Class GenericAction<Request extends ActionRequest,Response extends ActionResponse>
- java.lang.Object
-
- org.elasticsearch.action.GenericAction<Request,Response>
-
- Direct Known Subclasses:
Action
public abstract class GenericAction<Request extends ActionRequest,Response extends ActionResponse> extends java.lang.Object
A generic action. Should strive to make it a singleton.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GenericAction(java.lang.String name)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
Writeable.Reader<Response>
getResponseReader()
Get a reader that can create a new instance of the class from aStreamInput
int
hashCode()
java.lang.String
name()
The name of the action.abstract Response
newResponse()
Deprecated.ImplementgetResponseReader()
instead and make this method throw anUnsupportedOperationException
TransportRequestOptions
transportOptions(Settings settings)
Optional request options for the action.
-
-
-
Method Detail
-
name
public java.lang.String name()
The name of the action. Must be unique across actions.
-
newResponse
@Deprecated public abstract Response newResponse()
Deprecated.ImplementgetResponseReader()
instead and make this method throw anUnsupportedOperationException
Creates a new response instance.
-
getResponseReader
public Writeable.Reader<Response> getResponseReader()
Get a reader that can create a new instance of the class from aStreamInput
-
transportOptions
public TransportRequestOptions transportOptions(Settings settings)
Optional request options for the action.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-