|
Last change
on this file since 8260 was 4231, checked in by stoecker, 14 years ago |
|
add signpost and metadata extractor code to repository directly
|
|
File size:
990 bytes
|
| Line | |
|---|
| 1 | package oauth.signpost.basic;
|
|---|
| 2 |
|
|---|
| 3 | import java.io.IOException;
|
|---|
| 4 | import java.io.InputStream;
|
|---|
| 5 | import java.util.Collections;
|
|---|
| 6 | import java.util.Map;
|
|---|
| 7 |
|
|---|
| 8 | import oauth.signpost.http.HttpRequest;
|
|---|
| 9 |
|
|---|
| 10 | public class UrlStringRequestAdapter implements HttpRequest {
|
|---|
| 11 |
|
|---|
| 12 | private String url;
|
|---|
| 13 |
|
|---|
| 14 | public UrlStringRequestAdapter(String url) {
|
|---|
| 15 | this.url = url;
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | public String getMethod() {
|
|---|
| 19 | return "GET";
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | public String getRequestUrl() {
|
|---|
| 23 | return url;
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | public void setRequestUrl(String url) {
|
|---|
| 27 | this.url = url;
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | public void setHeader(String name, String value) {
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | public String getHeader(String name) {
|
|---|
| 34 | return null;
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | public Map<String, String> getAllHeaders() {
|
|---|
| 38 | return Collections.emptyMap();
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | public InputStream getMessagePayload() throws IOException {
|
|---|
| 42 | return null;
|
|---|
| 43 | }
|
|---|
| 44 |
|
|---|
| 45 | public String getContentType() {
|
|---|
| 46 | return null;
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | public Object unwrap() {
|
|---|
| 50 | return url;
|
|---|
| 51 | }
|
|---|
| 52 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.