Class ThriftCallService
- java.lang.Object
-
- com.linecorp.armeria.server.thrift.ThriftCallService
-
- All Implemented Interfaces:
com.linecorp.armeria.common.util.Unwrappable,com.linecorp.armeria.server.RpcService,com.linecorp.armeria.server.Service<com.linecorp.armeria.common.RpcRequest,com.linecorp.armeria.common.RpcResponse>
public final class ThriftCallService extends Object implements com.linecorp.armeria.server.RpcService
AServicethat handles a ThriftRpcRequest.- See Also:
THttpService
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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,?> implementations)Creates a new multiplexedThriftCallServicewith the specified service implementations.com.linecorp.armeria.common.RpcResponseserve(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.RpcRequest call)
-
-
-
Method Detail
-
of
public static ThriftCallService of(Object implementation)
Creates a newThriftCallServicewith the specified service implementation.- Parameters:
implementation- an implementation of*.Ifaceor*.AsyncIfaceservice interface generated by the Apache Thrift compiler
-
of
public static ThriftCallService of(Map<String,?> implementations)
Creates a new multiplexedThriftCallServicewith the specified service implementations.- Parameters:
implementations- aMapwhose key is service name and value is the implementation of*.Ifaceor*.AsyncIfaceservice interface generated by the Apache Thrift compiler
-
entries
public Map<String,ThriftServiceEntry> 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
public com.linecorp.armeria.common.RpcResponse serve(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.RpcRequest call) throws Exception- Specified by:
servein interfacecom.linecorp.armeria.server.RpcService- Specified by:
servein interfacecom.linecorp.armeria.server.Service<com.linecorp.armeria.common.RpcRequest,com.linecorp.armeria.common.RpcResponse>- Throws:
Exception
-
-