T_I - the Request type of the Service being decoratedT_O - the Response type of the Service being decoratedR_I - the Request type of this ServiceR_O - the Response type of this Servicepublic 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>
Service that decorates another Service. Use SimpleDecoratingHttpService or
SimpleDecoratingRpcService if your Service has the same Request and Response
type with the Service being decorated.| Modifier | Constructor and Description |
|---|---|
protected |
DecoratingService(Service<T_I,T_O> delegate)
Creates a new instance that decorates the specified
Service. |
| Modifier and Type | Method and Description |
|---|---|
void |
serviceAdded(ServiceConfig cfg)
Invoked when this service has been added to a
Server with the specified
configuration. |
boolean |
shouldCachePath(String path,
String query,
Route route)
Returns whether the given
path and query should be cached if the service's result is
successful. |
as, delegate, toStringpublic void serviceAdded(ServiceConfig cfg) throws Exception
ServiceServer with the specified
configuration. Please note that this method can be invoked more than once if this service
has been added more than once.Copyright © 2020 LeanCloud. All rights reserved.