Class JobParameterRequest
java.lang.Object
org.opensearch.core.transport.TransportMessage
org.opensearch.transport.TransportRequest
org.opensearch.action.ActionRequest
org.opensearch.jobscheduler.transport.request.JobParameterRequest
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable,org.opensearch.tasks.TaskAwareRequest
public class JobParameterRequest
extends org.opensearch.action.ActionRequest
Request to extensions to parse a ScheduledJobParameter
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.transport.TransportRequest
org.opensearch.transport.TransportRequest.EmptyNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionJobParameterRequest(byte[] requestParams) Instantiates a new Job Parameter Request by wrapping the given byte array within aStreamInputJobParameterRequest(String accessToken, org.opensearch.core.xcontent.XContentParser jobParser, String id, org.opensearch.jobscheduler.spi.JobDocVersion jobDocVersion) Instantiates a new Job Parameter RequestJobParameterRequest(org.opensearch.core.common.io.stream.StreamInput in) Instantiates a new Job Parameter Request fromStreamInput -
Method Summary
Methods inherited from class org.opensearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.opensearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.opensearch.core.transport.TransportMessage
remoteAddress, remoteAddressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Constructor Details
-
JobParameterRequest
public JobParameterRequest(String accessToken, org.opensearch.core.xcontent.XContentParser jobParser, String id, org.opensearch.jobscheduler.spi.JobDocVersion jobDocVersion) throws IOException Instantiates a new Job Parameter Request- Parameters:
accessToken- the user identiy/access token that will be validated prior to triggering an extension actionjobParser- the parser obect to extract the jobSourceBytesReferencefromid- the job idjobDocVersion- the job document version- Throws:
IOException- IOException when message de-serialization fails.
-
JobParameterRequest
Instantiates a new Job Parameter Request fromStreamInput- Parameters:
in- is the byte stream input used to de-serialize the message.- Throws:
IOException- IOException when message de-serialization fails.
-
JobParameterRequest
Instantiates a new Job Parameter Request by wrapping the given byte array within aStreamInput- Parameters:
requestParams- in bytes array used to de-serialize the message.- Throws:
IOException- when message de-serialization fails.
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceorg.opensearch.core.common.io.stream.Writeable- Overrides:
writeToin classorg.opensearch.action.ActionRequest- Throws:
IOException
-
validate
public org.opensearch.action.ActionRequestValidationException validate()- Specified by:
validatein classorg.opensearch.action.ActionRequest
-
getAccessToken
-
getJobSource
public org.opensearch.core.common.bytes.BytesReference getJobSource() -
getId
-
getJobDocVersion
public org.opensearch.jobscheduler.spi.JobDocVersion getJobDocVersion()
-