I
- O
- public class SameDiffServlet<I,O> extends Object implements ModelServingServlet<I,O>
Modifier and Type | Field and Description |
---|---|
protected BinaryDeserializer<I> |
binaryDeserializer |
protected BinarySerializer<O> |
binarySerializer |
protected JsonDeserializer<I> |
deserializer |
protected InferenceAdapter<I,O> |
inferenceAdapter |
protected static String |
LISTING_ENDPOINT |
protected String[] |
orderedInputNodes |
protected String[] |
orderedOutputNodes |
protected static int |
PAYLOAD_SIZE_LIMIT |
protected SameDiff |
sdModel |
protected JsonSerializer<O> |
serializer |
protected static String |
SERVING_ENDPOINT |
protected static String |
typeBinary |
protected static String |
typeJson |
Modifier | Constructor and Description |
---|---|
protected |
SameDiffServlet(@NonNull InferenceAdapter<I,O> inferenceAdapter,
BinarySerializer<O> serializer,
BinaryDeserializer<I> deserializer) |
protected |
SameDiffServlet(@NonNull InferenceAdapter<I,O> inferenceAdapter,
JsonSerializer<O> serializer,
JsonDeserializer<I> deserializer) |
protected |
SameDiffServlet(@NonNull InferenceAdapter<I,O> inferenceAdapter,
JsonSerializer<O> jsonSerializer,
JsonDeserializer<I> jsonDeserializer,
BinarySerializer<O> binarySerializer,
BinaryDeserializer<I> binaryDeserializer) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
javax.servlet.ServletConfig |
getServletConfig() |
String |
getServletInfo() |
void |
init(javax.servlet.ServletConfig servletConfig) |
protected void |
sendBadContentType(String actualContentType,
javax.servlet.http.HttpServletResponse response) |
protected void |
sendError(String uri,
javax.servlet.http.HttpServletResponse response) |
void |
service(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse) |
protected boolean |
validateRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected static final String typeJson
protected static final String typeBinary
protected SameDiff sdModel
protected JsonSerializer<O> serializer
protected JsonDeserializer<I> deserializer
protected BinarySerializer<O> binarySerializer
protected BinaryDeserializer<I> binaryDeserializer
protected InferenceAdapter<I,O> inferenceAdapter
protected String[] orderedInputNodes
protected String[] orderedOutputNodes
protected static final String SERVING_ENDPOINT
protected static final String LISTING_ENDPOINT
protected static final int PAYLOAD_SIZE_LIMIT
protected SameDiffServlet(@NonNull @NonNull InferenceAdapter<I,O> inferenceAdapter, JsonSerializer<O> serializer, JsonDeserializer<I> deserializer)
protected SameDiffServlet(@NonNull @NonNull InferenceAdapter<I,O> inferenceAdapter, BinarySerializer<O> serializer, BinaryDeserializer<I> deserializer)
protected SameDiffServlet(@NonNull @NonNull InferenceAdapter<I,O> inferenceAdapter, JsonSerializer<O> jsonSerializer, JsonDeserializer<I> jsonDeserializer, BinarySerializer<O> binarySerializer, BinaryDeserializer<I> binaryDeserializer)
public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
javax.servlet.ServletException
public javax.servlet.ServletConfig getServletConfig()
getServletConfig
in interface javax.servlet.Servlet
public void service(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws javax.servlet.ServletException, IOException
service
in interface javax.servlet.Servlet
javax.servlet.ServletException
IOException
protected void sendError(String uri, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void sendBadContentType(String actualContentType, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected boolean validateRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
public String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
public void destroy()
destroy
in interface javax.servlet.Servlet
Copyright © 2020. All rights reserved.