Class ThriftCallService
java.lang.Object
com.linecorp.armeria.server.thrift.ThriftCallService
- All Implemented Interfaces:
Unwrappable,RpcService,Service<RpcRequest,RpcResponse>
public final class ThriftCallService extends Object implements RpcService
An
RpcService that handles a Thrift RpcRequest.- See Also:
THttpService
-
Method Summary
Modifier and Type Method Description Map<String,ThriftServiceEntry>entries()Returns the information about the Thrift services being served.static ThriftCallServiceof(Object implementation)Creates a newThriftCallServicewith the specified service implementation.static ThriftCallServiceof(Map<String,? extends Iterable<?>> implementations)Creates a new multiplexedThriftCallServicewith the specified list service implementations.RpcResponseserve(ServiceRequestContext ctx, RpcRequest call)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.Service
as, serviceAdded, shouldCachePath, unwrap
-
Method Details
-
of
Creates a newThriftCallServicewith the specified service implementation.- Parameters:
implementation- an implementation of*.Ifaceor*.AsyncIfaceservice interface generated by the Apache Thrift compiler
-
of
Creates a new multiplexedThriftCallServicewith the specified list service implementations.- Parameters:
implementations- aMapwhose key is service name and value is the list of implementations of*.Ifaceor*.AsyncIfaceservice interface generated by the Apache Thrift compiler
-
entries
Returns the information about the Thrift services being served.- Returns:
- a
Mapwhose key is a service name, which could be an empty string if this service is not multiplexed
-
serve
Description copied from interface:ServiceServes an incomingRequest.- Specified by:
servein interfaceRpcService- Specified by:
servein interfaceService<RpcRequest,RpcResponse>- Parameters:
ctx- the context of the receivedRequestcall- the receivedRequest- Returns:
- the
Response - Throws:
Exception
-