blob: ed2897ba3627f8e5a92bd3188848a026bc1ca4ca [file] [log] [blame]
Jonathan Heard2bfd7df2015-10-28 17:34:27 +00001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
Christian Weiss8fb719e2018-03-30 21:26:04 +020020using System;
Jonathan Heard2bfd7df2015-10-28 17:34:27 +000021using System.Collections.Generic;
22using System.Linq;
23using System.Text;
24using Thrift.Server;
25using Thrift.Transport;
26
27namespace Thrift
28{
29 public class TSingletonProcessorFactory : TProcessorFactory
30 {
31 private readonly TProcessor processor_;
32
33 public TSingletonProcessorFactory(TProcessor processor)
34 {
35 processor_ = processor;
36 }
37
38 public TProcessor GetProcessor(TTransport trans, TServer server = null)
39 {
40 return processor_;
41 }
42 }
43}