def get_rpc_server(transport, target, endpoints, executor='blocking', serializer=None, access_policy=None): """Construct an RPC server. :param transport: the messaging transport :type transport: Transport :param target: the exchange, topic and server to listen on :type target: Target :param endpoints: a list of endpoint objects :type endpoints: list :param executor: name of message executor - available values are 'eventlet' and 'threading' :type executor: str :param serializer: an optional entity serializer :type serializer: Serializer :param access_policy: an optional access policy. Defaults to DefaultRPCAccessPolicy :type access_policy: RPCAccessPolicyBase """ dispatcher = rpc_dispatcher.RPCDispatcher(endpoints, serializer, access_policy) return RPCServer(transport, target, dispatcher, executor)
def get_rpc_server(transport, target, endpoints, executor='blocking', serializer=None): """Construct an RPC server. The executor parameter controls how incoming messages will be received and dispatched. By default, the most simple executor is used - the blocking executor. If the eventlet executor is used, the threading and time library need to be monkeypatched. :param transport: the messaging transport :type transport: Transport :param target: the exchange, topic and server to listen on :type target: Target :param endpoints: a list of endpoint objects :type endpoints: list :param executor: name of a message executor - for example 'eventlet', 'blocking' :type executor: str :param serializer: an optional entity serializer :type serializer: Serializer """ dispatcher = rpc_dispatcher.RPCDispatcher(target, endpoints, serializer) return msg_server.MessageHandlingServer(transport, dispatcher, executor)
def get_rpc_server(transport, target, endpoints, executor='blocking', serializer=None): return server.RPCServer( transport, target, dispatcher.RPCDispatcher(endpoints, serializer), executor )