Class AbstractPooledHttpService
java.lang.Object
com.linecorp.armeria.server.unsafe.AbstractPooledHttpService
- All Implemented Interfaces:
Unwrappable
,HttpService
,Service<HttpRequest,HttpResponse>
,PooledHttpService
- Direct Known Subclasses:
AbstractUnsafeUnaryGrpcService
public abstract class AbstractPooledHttpService extends Object implements PooledHttpService
A skeletal
HttpService
for easier HTTP service implementation that publishes PooledHttpData
.- See Also:
AbstractHttpService
,PooledHttpData
-
Constructor Summary
Constructors Constructor Description AbstractPooledHttpService()
-
Method Summary
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.Service
as, serviceAdded, shouldCachePath, unwrap
-
Constructor Details
-
AbstractPooledHttpService
public AbstractPooledHttpService()
-
-
Method Details
-
serve
public final PooledHttpResponse serve(ServiceRequestContext ctx, PooledHttpRequest req) throws ExceptionServes the specifiedPooledHttpRequest
by delegating it to the matching'doMETHOD()'
method.- Specified by:
serve
in interfacePooledHttpService
- Parameters:
ctx
- the context of the receivedPooledHttpRequest
req
- the receivedPooledHttpRequest
- Returns:
- the
PooledHttpResponse
- Throws:
Exception
-
doOptions
protected HttpResponse doOptions(ServiceRequestContext ctx, PooledHttpRequest req) throws ExceptionHandles anOPTIONS
request. This method sends a405 Method Not Allowed
response by default.- Throws:
Exception
-
doGet
Handles aGET
request. This method sends a405 Method Not Allowed
response by default.- Throws:
Exception
-
doHead
Handles aHEAD
request. This method sends a405 Method Not Allowed
response by default.- Throws:
Exception
-
doPost
Handles aPOST
request. This method sends a405 Method Not Allowed
response by default.- Throws:
Exception
-
doPut
Handles aPUT
request. This method sends a405 Method Not Allowed
response by default.- Throws:
Exception
-
doPatch
Handles aPATCH
request. This method sends a405 Method Not Allowed
response by default.- Throws:
Exception
-
doDelete
Handles aDELETE
request. This method sends a405 Method Not Allowed
response by default.- Throws:
Exception
-
doTrace
Handles aTRACE
request. This method sends a405 Method Not Allowed
response by default.- Throws:
Exception
-