blob: 3d55f4793192ffa795c2e1fb1f9195b48a3fd2b5 [file] [log] [blame]
Andrew McGeachie0c895712009-07-21 21:14:19 +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
20
21#import "TSharedProcessorFactory.h"
Jens Geyer56e5b9b2015-10-09 22:01:55 +020022
23
24@interface TSharedProcessorFactory ()
25
26@property(strong, nonatomic) id<TProcessor> sharedProcessor;
27
28@end
Andrew McGeachie0c895712009-07-21 21:14:19 +000029
30
31@implementation TSharedProcessorFactory
32
33
Jens Geyer56e5b9b2015-10-09 22:01:55 +020034-(id) initWithSharedProcessor:(id<TProcessor>)sharedProcessor
Andrew McGeachie0c895712009-07-21 21:14:19 +000035{
36 self = [super init];
Jens Geyer56e5b9b2015-10-09 22:01:55 +020037 if (self) {
38 _sharedProcessor = sharedProcessor;
Andrew McGeachie0c895712009-07-21 21:14:19 +000039 }
Jens Geyer56e5b9b2015-10-09 22:01:55 +020040
Andrew McGeachie0c895712009-07-21 21:14:19 +000041 return self;
42}
43
Jens Geyer56e5b9b2015-10-09 22:01:55 +020044-(id<TProcessor>) processorForTransport:(id<TTransport>)transport
Andrew McGeachie0c895712009-07-21 21:14:19 +000045{
Jens Geyer56e5b9b2015-10-09 22:01:55 +020046 return _sharedProcessor;
Andrew McGeachie0c895712009-07-21 21:14:19 +000047}
48
49@end