Package com.linecorp.armeria.server
Class DecoratingService<T_I extends Request,T_O extends Response,R_I extends Request,R_O extends Response>
java.lang.Object
com.linecorp.armeria.common.util.AbstractUnwrappable<Service<T_I,T_O>>
com.linecorp.armeria.server.DecoratingService<T_I,T_O,R_I,R_O>
- Type Parameters:
T_I
- theRequest
type of theService
being decoratedT_O
- theResponse
type of theService
being decoratedR_I
- theRequest
type of thisService
R_O
- theResponse
type of thisService
- All Implemented Interfaces:
Unwrappable
,Service<R_I,
R_O>
- Direct Known Subclasses:
SimpleDecoratingService
,THttpService
public abstract class DecoratingService<T_I extends Request,T_O extends Response,R_I extends Request,R_O extends Response>
extends AbstractUnwrappable<Service<T_I,T_O>>
implements Service<R_I,R_O>
A
Service
that decorates another Service
. Use SimpleDecoratingHttpService
or
SimpleDecoratingRpcService
if your Service
has the same Request
and Response
type with the Service
being decorated.-
Constructor Summary
ModifierConstructorDescriptionprotected
DecoratingService
(Service<T_I, T_O> delegate) Creates a new instance that decorates the specifiedService
. -
Method Summary
Methods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable
as, toString, unwrap
-
Constructor Details
-
DecoratingService
Creates a new instance that decorates the specifiedService
.
-
-
Method Details
-
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. -
shouldCachePath
Description copied from interface:Service
Returns whether the givenpath
andquery
should be cached if the service's result is successful. By default, exact path mappings with no input query are cached.
-