python 代码实例1
package com.cloud.apigateway.sdk.demo;
import java.io.InputStream;
import java.net.URL;
import java.util.Map;
import org.apache.http.HttpResponse;
import com.cloud.sdk.http.HttpMethodName;
public abstract class AccessService {
protected String serviceName = null;
protected String region = null;
protected String ak = null;
protected String sk = null;
public AccessService(String serviceName, String region, String ak, String sk) {
this.region = region;
this.serviceName = serviceName;
this.ak = ak;
this.sk = sk;
}
public abstract HttpResponse access(URL url, Map<String, String> header, InputStream content,
Long contentLength,
HttpMethodName httpMethod) throws Exception;
public HttpResponse access(URL url, Map<String, String> header, HttpMethodName httpMethod)
throws Exception {
return this.access(url, header, null, 0l, httpMethod);
}
public HttpResponse access(URL url, InputStream content, Long contentLength, HttpMethodName
httpMethod)
throws Exception {
return this.access(url, null, content, contentLength, httpMethod);
}
public HttpResponse access(URL url, HttpMethodName httpMethod) throws Exception {
return this.access(url, null, null, 0l, httpMethod);
}
public abstract void close();
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getAk() {
return ak;
}
public void setAk(String ak) {
this.ak = ak;
}
public String getSk() {
return sk;
}
public void setSk(String sk) {
this.sk = sk;
}
}
import java.io.InputStream;
import java.net.URL;
import java.util.Map;
import org.apache.http.HttpResponse;
import com.cloud.sdk.http.HttpMethodName;
public abstract class AccessService {
protected String serviceName = null;
protected String region = null;
protected String ak = null;
protected String sk = null;
public AccessService(String serviceName, String region, String ak, String sk) {
this.region = region;
this.serviceName = serviceName;
this.ak = ak;
this.sk = sk;
}
public abstract HttpResponse access(URL url, Map<String, String> header, InputStream content,
Long contentLength,
HttpMethodName httpMethod) throws Exception;
public HttpResponse access(URL url, Map<String, String> header, HttpMethodName httpMethod)
throws Exception {
return this.access(url, header, null, 0l, httpMethod);
}
public HttpResponse access(URL url, InputStream content, Long contentLength, HttpMethodName
httpMethod)
throws Exception {
return this.access(url, null, content, contentLength, httpMethod);
}
public HttpResponse access(URL url, HttpMethodName httpMethod) throws Exception {
return this.access(url, null, null, 0l, httpMethod);
}
public abstract void close();
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getAk() {
return ak;
}
public void setAk(String ak) {
this.ak = ak;
}
public String getSk() {
return sk;
}
public void setSk(String sk) {
this.sk = sk;
}
}
上一篇:deep learning
下一篇:弟子规
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
文章热度:★★★☆☆
文章难度:★★★★☆
文章质量:★★★☆☆
说明:系统根据文章的热度、难度、质量自动认证,已认证的文章将参与打字排名!
本文打字排名TOP20
- 1游客19463060... 05-03 16:00365 KPM
- 2游客19452635... 05-01 09:32351 KPM
- 3游客19553713... 05-21 20:47351 KPM
- 4游客19514947... 05-14 07:54344 KPM
- 5游客19512955... 05-13 21:06340 KPM
- 6游客19453157... 05-01 12:34334 KPM
- 7游客19512340... 05-13 17:57333 KPM
- 8游客19454555... 05-01 18:32327 KPM
- 9游客19440103... 04-28 17:18302 KPM
- 10游客19445589... 04-29 20:24301 KPM
- 11酷爱吃饭 04-01 12:18299 KPM
- 12游客19452573... 05-01 09:14292 KPM
- 13大一魔法程序... 04-28 19:47285 KPM
- 14游客19435207... 04-28 00:09282 KPM
- 15zmx0142857 03-31 20:39276 KPM
- 16aowoe 04-27 22:40274 KPM
- 17游客18885561... 04-28 10:45274 KPM
- 18游客19775551... 07-10 14:56264 KPM
- 19helloworldc... 04-30 19:18261 KPM
- 20guagua_SAM... 02-07 22:13258 KPM