Package org.bsc.langgraph4j.studio.agui
Class AGUILangGraphStudioServer.StreamServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.bsc.langgraph4j.studio.agui.AGUILangGraphStudioServer.StreamServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable,LG4JLoggable
- Enclosing interface:
AGUILangGraphStudioServer
public static class AGUILangGraphStudioServer.StreamServlet
extends jakarta.servlet.http.HttpServlet
implements LG4JLoggable
Servlet for handling graph stream requests.
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEADFields inherited from interface org.bsc.langgraph4j.LG4JLoggable
log -
Constructor Summary
ConstructorsConstructorDescriptionStreamServlet(AGUIAgentRegistry agentRegistry, AGUILangGraphStudioJacksonSerializer aguiSerializer) Constructs a StreamServlet. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoDelete(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Cancel running iterationprotected voiddoPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Handles POST requests to stream graph data.voidinit(jakarta.servlet.ServletConfig config) Methods inherited from class jakarta.servlet.http.HttpServlet
doGet, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
StreamServlet
public StreamServlet(AGUIAgentRegistry agentRegistry, AGUILangGraphStudioJacksonSerializer aguiSerializer) Constructs a StreamServlet.
-
-
Method Details
-
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletException
-
doDelete
protected void doDelete(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException Cancel running iteration- Overrides:
doDeletein classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
doPost
protected void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException Handles POST requests to stream graph data.- Overrides:
doPostin classjakarta.servlet.http.HttpServlet- Parameters:
req- the HTTP req.resp- the HTTP resp.- Throws:
jakarta.servlet.ServletException- if a servlet error occurs.IOException- if an I/O error occurs.
-