Class EmbeddedJettyServer
java.lang.Object
com.github.thought2code.mcp.annotated.server.EmbeddedJettyServer
Embedded Jetty HTTP server implementation.
- Author:
- codeboyzhou
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor to initialize Jetty HTTP server with a single thread. -
Method Summary
-
Constructor Details
-
EmbeddedJettyServer
public EmbeddedJettyServer()Constructor to initialize Jetty HTTP server with a single thread.
-
-
Method Details
-
use
Register a servlet to be handled by Jetty HTTP server.- Parameters:
servlet- the servlet to be registered- Returns:
- this server instance
-
bind
Bind Jetty HTTP server to a specific port.- Parameters:
port- the port to bind the server to- Returns:
- this server instance
-
start
public void start()Start Jetty HTTP server and bind it to the specified port.
-