App Engine Java SDK version 1.9.10
[gae.git] / java / src / main / com / google / appengine / tools / admin / ServerConnection.java
blob179db7872cf4da36221c0c8c1f03ef07dd3021f6
1 // Copyright 2011 Google Inc. All Rights Reserved.
3 package com.google.appengine.tools.admin;
5 import com.google.common.collect.Multimap;
7 import java.io.File;
8 import java.io.IOException;
9 import java.io.InputStream;
10 import java.util.List;
11 import java.util.Map;
13 /**
14 * Interface for connections to the AppEngine hosting service.
17 public interface ServerConnection {
19 String get(String url, Map<String, String> params) throws IOException;
21 String get(String url, Multimap<String, String> params) throws IOException;
23 String post(String url, File payload, String contentType, Map<String, String> params)
24 throws IOException;
26 String post(String url, File payload, String contentType, Multimap<String, String> params)
27 throws IOException;
29 String post(String url, File payload, String contentType, String... params) throws IOException;
31 String post(String url, List<AppVersionUpload.FileInfo> payload, String... params)
32 throws IOException;
34 String post(String url, String payload, Map<String, String> params) throws IOException;
36 String post(String url, String payload, Multimap<String, String> params) throws IOException;
38 String post(String url, String payload, String... params) throws IOException;
40 /**
41 * Returns an input stream that reads from this open connection. If the server returned
42 * an error (404, etc), return the error stream instead.
44 * @return {@code InputStream} for the server response.
46 InputStream postAndGetInputStream(String url, String payload, String... params)
47 throws IOException;