Class JettyService
java.lang.Object
com.linecorp.armeria.server.jetty.JettyService
- All Implemented Interfaces:
Unwrappable
,HttpService
,Service<HttpRequest,HttpResponse>
An
HttpService
that dispatches its requests to a web application running in an embedded
Jetty.- See Also:
JettyServiceBuilder
-
Method Summary
Modifier and TypeMethodDescriptionstatic JettyServiceBuilder
builder()
Returns a newJettyServiceBuilder
.static JettyService
Creates a newJettyService
from an existing JettyServer
.static JettyService
Creates a newJettyService
from an existing JettyServer
.serve(ServiceRequestContext ctx, HttpRequest req)
Serves an incomingRequest
.void
serviceAdded(ServiceConfig cfg)
Invoked when this service has been added to aServer
with the specified configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.server.HttpService
decorate, decorate
Methods inherited from interface com.linecorp.armeria.server.Service
as, shouldCachePath, unwrap
-
Method Details
-
of
Creates a newJettyService
from an existing JettyServer
.- Parameters:
jettyServer
- the JettyServer
-
of
Creates a newJettyService
from an existing JettyServer
.- Parameters:
jettyServer
- the JettyServer
hostname
- the default hostname
-
builder
Returns a newJettyServiceBuilder
. -
serviceAdded
Description copied from interface:Service
Invoked when this service has been added to aServer
with the specified configuration. Please note that this method can be invoked more than once if this service has been added more than once.- Specified by:
serviceAdded
in interfaceService<HttpRequest,HttpResponse>
-
serve
Description copied from interface:Service
Serves an incomingRequest
.- Specified by:
serve
in interfaceHttpService
- Specified by:
serve
in interfaceService<HttpRequest,HttpResponse>
- Parameters:
ctx
- the context of the receivedRequest
req
- the receivedRequest
- Returns:
- the
Response
-