@@ -0,0 +1,2505 @@
+/*%0A * Copyright 2015 Eric Liu%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.liuguangqiang.asyncokhttp;%0A%0Aimport com.liuguangqiang.asyncokhttp.json.BaseJsonEngine;%0Aimport com.liuguangqiang.asyncokhttp.json.LoganSquareEngine;%0A%0Aimport javax.net.SocketFactory;%0A%0A/**%0A * Created by Eric on 15/6/11.%0A */%0Apublic class Configuration %7B%0A%0A    private BaseJsonEngine jsonEngine;%0A    private long connectTimeout;%0A    private long readTimeout;%0A%0A    public BaseJsonEngine getJsonEngine() %7B%0A        return jsonEngine;%0A    %7D%0A%0A    public void setJsonEngine(BaseJsonEngine jsonEngine) %7B%0A        this.jsonEngine = jsonEngine;%0A    %7D%0A%0A    public long getConnectTimeout() %7B%0A        return connectTimeout;%0A    %7D%0A%0A    public void setConnectTimeout(long connectTimeout) %7B%0A        this.connectTimeout = connectTimeout;%0A    %7D%0A%0A    public long getReadTimeout() %7B%0A        return readTimeout;%0A    %7D%0A%0A    public void setReadTimeout(long readTimeout) %7B%0A        this.readTimeout = readTimeout;%0A    %7D%0A%0A    public Configuration(Builder builder) %7B%0A        jsonEngine = builder.jsonEngine;%0A        connectTimeout = builder.connectTimeout;%0A        readTimeout = builder.readTimeout;%0A    %7D%0A%0A    public static class Builder %7B%0A%0A        private BaseJsonEngine jsonEngine;%0A        private long connectTimeout;%0A        private long readTimeout;%0A%0A        public Builder() %7B%0A            jsonEngine = new LoganSquareEngine();%0A            connectTimeout = 30;%0A            readTimeout = 30;%0A        %7D%0A%0A        public Builder jsonEngine(BaseJsonEngine jsonEngine) %7B%0A            this.jsonEngine = jsonEngine;%0A            return this;%0A        %7D%0A%0A        public Builder connectTimeout(long connectTimeout) %7B%0A            this.connectTimeout = connectTimeout;%0A            return this;%0A        %7D%0A%0A        public Builder readTimeout(long readTimeout) %7B%0A            this.readTimeout = readTimeout;%0A            return this;%0A        %7D%0A%0A        public Configuration build() %7B%0A            return new Configuration(this);%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

Create Configuration for creating OkHttpClient.