Class TomcatService
java.lang.Object
com.linecorp.armeria.server.tomcat.TomcatService
- All Implemented Interfaces:
Unwrappable,HttpService,Service<HttpRequest,HttpResponse>
An
HttpService that dispatches its requests to a web application running in an embedded
Tomcat.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic TomcatServiceBuilderCreates a newTomcatServiceBuilderwith the web application at the specified document base, which can be a directory or a JAR/WAR file.static TomcatServiceBuilderCreates a newTomcatServiceBuilderwith the web application at the specified document base, which can be a directory or a JAR/WAR file.static TomcatServiceBuilderCreates a newTomcatServiceBuilderwith the web application at the specified document base, which can be a directory or a JAR/WAR file.static TomcatServiceBuilderCreates a newTomcatServiceBuilderwith the web application at the specified document base, which can be a directory or a JAR/WAR file.Returns TomcatConnector.exchangeType(RoutingContext routingContext) static TomcatServiceCreates a newTomcatServicewith the web application at the specified document base, which can be a directory or a JAR/WAR file.static TomcatServiceCreates a newTomcatServicewith the web application at the specified document base, which can be a directory or a JAR/WAR file.static TomcatServiceCreates a newTomcatServicewith the web application at the specified document base, which can be a directory or a JAR/WAR file.static TomcatServiceCreates a newTomcatServicewith the web application at the specified document base, which can be a directory or a JAR/WAR file.static TomcatServiceCreates a newTomcatServicefrom an existing TomcatConnectorinstance.static TomcatServiceCreates a newTomcatServicefrom an existing TomcatConnectorinstance.static TomcatServiceCreates a newTomcatServicefrom an existingTomcatinstance.final HttpResponseserve(ServiceRequestContext ctx, HttpRequest req) Serves an incomingRequest.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linecorp.armeria.server.HttpService
decorate, decorate, optionsMethods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrapMethods inherited from interface com.linecorp.armeria.common.util.Unwrappable
equalsIgnoreWrapper, unwrapAll
-
Method Details
-
of
Creates a newTomcatServicewith the web application at the specified document base, which can be a directory or a JAR/WAR file. -
of
Creates a newTomcatServicewith the web application at the specified document base, which can be a directory or a JAR/WAR file. -
of
Creates a newTomcatServicewith the web application at the specified document base, which can be a directory or a JAR/WAR file. -
of
Creates a newTomcatServicewith the web application at the specified document base, which can be a directory or a JAR/WAR file. -
of
Creates a newTomcatServicefrom an existingTomcatinstance. If the specifiedTomcatinstance is not configured properly, the returnedTomcatServicemay respond with '503 Service Not Available' error.- Returns:
- a new
TomcatService, which will not manage the providedTomcatinstance.
-
of
Creates a newTomcatServicefrom an existing TomcatConnectorinstance. If the specifiedConnectorinstance is not configured properly, the returnedTomcatServicemay respond with '503 Service Not Available' error.- Returns:
- a new
TomcatService, which will not manage the providedConnectorinstance.
-
of
Creates a newTomcatServicefrom an existing TomcatConnectorinstance. If the specifiedConnectorinstance is not configured properly, the returnedTomcatServicemay respond with '503 Service Not Available' error.- Returns:
- a new
TomcatService, which will not manage the providedConnectorinstance.
-
builder
Creates a newTomcatServiceBuilderwith the web application at the specified document base, which can be a directory or a JAR/WAR file. -
builder
Creates a newTomcatServiceBuilderwith the web application at the specified document base, which can be a directory or a JAR/WAR file. -
builder
Creates a newTomcatServiceBuilderwith the web application at the specified document base, which can be a directory or a JAR/WAR file. -
builder
Creates a newTomcatServiceBuilderwith the web application at the specified document base, which can be a directory or a JAR/WAR file. -
connector
Returns TomcatConnector. -
serve
Description copied from interface:ServiceServes an incomingRequest.- Specified by:
servein interfaceHttpService- Specified by:
servein interfaceService<HttpRequest,HttpResponse> - Parameters:
ctx- the context of the receivedRequestreq- the receivedRequest- Returns:
- the
Response - Throws:
Exception
-
exchangeType
Description copied from interface:HttpServiceDetermines anExchangeTypefor thisHttpServicefrom the givenRoutingContext. By default,ExchangeType.BIDI_STREAMINGis set.Note that an
HttpRequestwill be aggregated before serving theHttpServiceifExchangeType.UNARYorExchangeType.RESPONSE_STREAMINGis set.- Specified by:
exchangeTypein interfaceHttpService
-