public class Job
extends java.lang.Object
| Constructor and Description |
|---|
Job(io.netty.channel.ChannelHandlerContext ctx,
java.lang.String modelName,
ai.djl.modality.Input input)
Constructs an new
Job instance. |
| Modifier and Type | Method and Description |
|---|---|
ai.djl.modality.Input |
getInput()
Returns the input data.
|
java.lang.String |
getModelName()
Returns the model name that associated with this job.
|
java.lang.String |
getRequestId()
Returns the request id.
|
void |
sendError(io.netty.handler.codec.http.HttpResponseStatus status,
java.lang.String error)
Sends error to the client.
|
void |
sendOutput(ai.djl.modality.Output output)
Sends the response back to the client.
|
void |
setScheduled()
Marks the job has been scheduled.
|
public Job(io.netty.channel.ChannelHandlerContext ctx,
java.lang.String modelName,
ai.djl.modality.Input input)
Job instance.ctx - the ChannelHandlerContextmodelName - the model nameinput - the input datapublic java.lang.String getRequestId()
public java.lang.String getModelName()
public ai.djl.modality.Input getInput()
public void setScheduled()
public void sendOutput(ai.djl.modality.Output output)
output - the outputpublic void sendError(io.netty.handler.codec.http.HttpResponseStatus status,
java.lang.String error)
status - the HTTP statuserror - the error message