1 /* 2 * Copyright (C) 2014 Square, Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.squareup.okhttp.benchmarks; 17 18 enum Client { 19 OkHttp { create()20 @Override HttpClient create() { 21 return new OkHttp(); 22 } 23 }, 24 25 OkHttpAsync { create()26 @Override HttpClient create() { 27 return new OkHttpAsync(); 28 } 29 }, 30 31 Apache { create()32 @Override HttpClient create() { 33 return new ApacheHttpClient(); 34 } 35 }, 36 37 UrlConnection { create()38 @Override HttpClient create() { 39 return new UrlConnection(); 40 } 41 }, 42 43 Netty { create()44 @Override HttpClient create() { 45 return new NettyHttpClient(); 46 } 47 }; 48 create()49 abstract HttpClient create(); 50 } 51