org.dasein.cloud.azure
Class AzureMethod

java.lang.Object
  extended by org.dasein.cloud.azure.AzureMethod

public class AzureMethod
extends Object

Handles connectivity to Microsoft Azure services.

Since:
2012.07
Version:
2012.07 initial version
Author:
George Reese (george.reese@imaginary.com)

Nested Class Summary
static class AzureMethod.AzureResponse
           
 
Constructor Summary
AzureMethod(Azure azure)
           
 
Method Summary
 InputStream getAsStream(String account, String resource)
           
 Document getAsXML(String account, String resource)
           
 Document getAsXML(String account, URI uri)
           
protected  org.apache.http.client.HttpClient getClient()
           
protected  org.apache.http.client.methods.HttpRequestBase getMethod(String httpMethod, String url)
           
 int getOperationStatus(String requestID)
           
 String invoke(String method, String account, String resource, String body)
           
 Document parseResponse(InputStream responseBodyAsStream, boolean withWireLogging)
           
 Document parseResponse(String responseBody, boolean withWireLogging)
           
 String post(String account, String resource, String body)
           
 void tempRedirectInvoke(String tempEndpoint, String method, String account, String resource, String body)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AzureMethod

public AzureMethod(Azure azure)
            throws CloudException
Throws:
CloudException
Method Detail

getAsStream

@Nullable
public InputStream getAsStream(@Nonnull
                                        String account,
                                        @Nonnull
                                        String resource)
                        throws CloudException,
                               InternalException
Throws:
CloudException
InternalException

getAsXML

@Nullable
public Document getAsXML(@Nonnull
                                  String account,
                                  @Nonnull
                                  String resource)
                  throws CloudException,
                         InternalException
Throws:
CloudException
InternalException

getAsXML

@Nullable
public Document getAsXML(@Nonnull
                                  String account,
                                  @Nonnull
                                  URI uri)
                  throws CloudException,
                         InternalException
Throws:
CloudException
InternalException

getClient

@Nonnull
protected org.apache.http.client.HttpClient getClient()
                                               throws CloudException,
                                                      InternalException
Throws:
CloudException
InternalException

parseResponse

@Nonnull
public Document parseResponse(@Nonnull
                                      String responseBody,
                                      boolean withWireLogging)
                       throws CloudException,
                              InternalException
Throws:
CloudException
InternalException

parseResponse

@Nonnull
public Document parseResponse(@Nonnull
                                      InputStream responseBodyAsStream,
                                      boolean withWireLogging)
                       throws CloudException,
                              InternalException
Throws:
CloudException
InternalException

post

public String post(@Nonnull
                   String account,
                   @Nonnull
                   String resource,
                   @Nonnull
                   String body)
            throws CloudException,
                   InternalException
Throws:
CloudException
InternalException

getMethod

protected org.apache.http.client.methods.HttpRequestBase getMethod(String httpMethod,
                                                                   String url)

invoke

public String invoke(@Nonnull
                     String method,
                     @Nonnull
                     String account,
                     @Nonnull
                     String resource,
                     @Nonnull
                     String body)
              throws CloudException,
                     InternalException
Throws:
CloudException
InternalException

tempRedirectInvoke

public void tempRedirectInvoke(@Nonnull
                               String tempEndpoint,
                               @Nonnull
                               String method,
                               @Nonnull
                               String account,
                               @Nonnull
                               String resource,
                               @Nonnull
                               String body)
                        throws CloudException,
                               InternalException
Throws:
CloudException
InternalException

getOperationStatus

@Nonnull
public int getOperationStatus(String requestID)
                       throws CloudException,
                              InternalException
Throws:
CloudException
InternalException


Copyright © 2013 enStratus Networks Inc. All Rights Reserved.