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
An RpcService that handles a Thrift RpcRequest.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the information about the Thrift services being served.
    of(Object implementation)
    Creates a new ThriftCallService with the specified service implementation.
    of(Map<String,? extends Iterable<?>> implementations)
    Creates a new multiplexed ThriftCallService with the specified list service implementations.
    com.linecorp.armeria.common.RpcResponse
    serve(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.RpcRequest call)
     

    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.RpcService

    decorate, decorate

    Methods inherited from interface com.linecorp.armeria.server.Service

    as, serviceAdded, shouldCachePath, unwrap

    Methods inherited from interface com.linecorp.armeria.common.util.Unwrappable

    equalsIgnoreWrapper, unwrapAll
  • Method Details

    • of

      public static ThriftCallService of(Object implementation)
      Creates a new ThriftCallService with the specified service implementation.
      Parameters:
      implementation - an implementation of *.Iface or *.AsyncIface service interface generated by the Apache Thrift compiler
    • of

      public static ThriftCallService of(Map<String,? extends Iterable<?>> implementations)
      Creates a new multiplexed ThriftCallService with the specified list service implementations.
      Parameters:
      implementations - a Map whose key is service name and value is the list of implementations of *.Iface or *.AsyncIface service interface generated by the Apache Thrift compiler
    • entries

      public Map<String,ThriftServiceEntry> entries()
      Returns the information about the Thrift services being served.
      Returns:
      a Map whose 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:
      serve in interface com.linecorp.armeria.server.RpcService
      Specified by:
      serve in interface com.linecorp.armeria.server.Service<com.linecorp.armeria.common.RpcRequest,com.linecorp.armeria.common.RpcResponse>
      Throws:
      Exception