Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix243 245 254 #33

Merged
merged 18 commits into from
Apr 5, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b880047
Switched from HTML to Markdown and added Tables to the Features section
joostdenijs Mar 7, 2012
15a260e
Merge pull request #23 from joostdenijs/dev
jcookems Mar 8, 2012
0078bd4
Fix for #243, #245, and #254
jcookems Mar 8, 2012
c18bddb
Add Javadocs comments to /queue and /queue/models
adashcolinr Mar 15, 2012
88d99b5
add package.html files for javadocs
adashcolinr Mar 19, 2012
feb654d
Merge remote-tracking branch 'origin' into dev
adashcolinr Mar 19, 2012
571122b
Merge remote-tracking branch 'upstream/dev' into dev
adashcolinr Mar 19, 2012
2877e82
Fix Javadoc build warnings.
adashcolinr Mar 22, 2012
da5f63a
Merge pull request #25 from adashcolinr/dev
joostdenijs Mar 26, 2012
b479cf6
Merge branch 'fix243_245_254' of github.com:jcookems/azure-sdk-for-ja…
jcookems Apr 4, 2012
3cc66d6
Merge branch 'dev-bookmark' of github.com:WindowsAzure/azure-sdk-for-…
jcookems Apr 4, 2012
922527a
Merge branch 'dev-bookmark' of github.com:WindowsAzure/azure-sdk-for-…
jcookems Apr 5, 2012
1a0f486
Merge branch 'fix243_245_254' of github.com:jcookems/azure-sdk-for-ja…
jcookems Apr 5, 2012
f587ac1
Merge branch 'dev' of github.com:WindowsAzure/azure-sdk-for-java into…
jcookems Apr 5, 2012
9a503ba
Simplify the processing of the batch error messages to avoid Jersey S…
jcookems Apr 5, 2012
f57a959
Merge branch 'fix243_245_254' of github.com:jcookems/azure-sdk-for-ja…
jcookems Apr 5, 2012
92b1db5
Adding unit test for batches that have errors.
jcookems Apr 5, 2012
d14c5c9
Fix minor spacing issues
jcookems Apr 5, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
244 changes: 121 additions & 123 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,137 +1,135 @@
<h1>Windows Azure SDK for Java</h1>
<p>This SDK allows you to build Windows Azure applications in Java that allow
#Windows Azure SDK for Java

This SDK allows you to build Windows Azure applications in Java that allow
you to take advantage of Azure scalable cloud computing resources: table and blob
storage, messaging through Service Bus.</p>

<p>For documentation please see the <a href="http://www.windowsazure.com/en-us/develop/java/">
Windows Azure Java Developer Center</a></p>

<h1>Features</h1>
<ul>
<li>Blob
<ul>
<li>Create/Read/Update/Delete Blobs</li>
</ul></li>
<li>Queue
<ul>
<li>Create/Delete Queues</li>
<li>Insert/Peek Queue Messages</li>
<li>Advanced Queue Operations</li>
</ul></li>
<li>Service Bus
<ul>
<li>Use either the Queue or Topic/Subscription Model</li>
</ul></li>
<li>Service Runtime
<ul>
<li>Retrieve information about the state of your Azure Compute instances</li>
</ul></li>
</ul>

<h1>Getting Started</h1>
<h2>Download</h2>
<h3>Option 1: Via Git</h3>
<p>To get the source code of the SDK via git just type:<br/>
<pre>git clone git://github.com/WindowsAzure/azure-sdk-for-java.git
cd ./azure-sdk-for-java/microsoft-azure-api
mvn compile</pre>

<h3>Option 2: Via Maven</h3>
<p>To get the binaries of this library as distributed by Microsoft, ready for use
within your project you can also have them installed by the Java package manager Maven.<br/>
<pre>&lt;dependency&gt;
&lt;groupId&gt;com.microsoft.windowsazure&lt;/groupId&gt;
&lt;artifactId&gt;microsoft-windowsazure-api&lt;/artifactId&gt;
&lt;version&gt;0.1.0&lt;/version&gt;
&lt;/dependency&gt;</pre></p>

<h2>Minimum Requirements</h2>
<ul>
<li>Java 1.6</li>
<li>(Optional) Maven</li>
</ul>

<h2>Usage</h2>
<p>To use this SDK to call Windows Azure services, you need to first create an
storage, messaging through Service Bus.

For documentation please see the [Windows Azure Java Developer Center](http://www.windowsazure.com/en-us/develop/java/)

#Features
* Blob
* Create/Read/Update/Delete Blobs
* Queue
* Create/Delete Queues
* Insert/Peek Queue Messages
* Advanced Queue Operations
* Service Bus
* Use either the Queue or Topic/Subscription Model
* Service Runtime
* Retrieve information about the state of your Azure Compute instances
* Table
* Manage Tables
* Work with Table Entities (CRUD)
* Entity Group Transactions (Batch)

#Getting Started

##Download
###Option 1: Via Git

To get the source code of the SDK via git just type:

git clone git://github.com/WindowsAzure/azure-sdk-for-java.git
cd ./azure-sdk-for-java
mvn compile

###Option 2: Via Maven

To get the binaries of this library as distributed by Microsoft, ready for use
within your project you can also have them installed by the Java package manager Maven.

<dependency>
<groupId>com.microsoft.windowsazure</groupId>
<artifactId>microsoft-windowsazure-api</artifactId>
<version>0.1.0</version>
</dependency>

##Minimum Requirements

* Java 1.6
* (Optional) Maven


##Usage

To use this SDK to call Windows Azure services, you need to first create an
account. To host your Java code in Windows Azure, you additionally need to download
the full Windows Azure SDK for Java - which includes packaging, emulation, and
deployment tools.</p>
deployment tools.

##Code Samples

<h2>Code Samples</h2>
<p>The following is a quick example on how to set up a Azure blob using the API
and uploading a file to it. For additional information on using the client libraries to access Azure services see the How To guides listed <a href="http://www.windowsazure.com/en-us/develop/java/">
here</a>.<br/>
The following is a quick example on how to set up a Azure blob using the API
and uploading a file to it. For additional information on using the client libraries to access Azure services see the How To guides listed [here](http://www.windowsazure.com/en-us/develop/java/).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this line is incomplete.

2 min later, actually, I think it is because a github bug, I cannot see the rest of the line, I think we should add an enter at character 80 so that the file will look consistent across different system.


<pre>import com.microsoft.windowsazure.services.core.storage.*;
import com.microsoft.windowsazure.services.blob.client.*;
import com.microsoft.windowsazure.services.core.storage.*;
import com.microsoft.windowsazure.services.blob.client.*;

public class BlobSample {
public class BlobSample {

public static final String storageConnectionString =
"DefaultEndpointsProtocol=http;" +
"AccountName=your_account_name;" +
"AccountKey= your_account_name";
public static final String storageConnectionString =
"DefaultEndpointsProtocol=http;" +
"AccountName=your_account_name;" +
"AccountKey= your_account_name";

public static void main(String[] args)
{
try
public static void main(String[] args)
{
CloudStorageAccount account;
CloudBlobClient serviceClient;
CloudBlobContainer container;
CloudBlockBlob blob;
try
{
CloudStorageAccount account;
CloudBlobClient serviceClient;
CloudBlobContainer container;
CloudBlockBlob blob;

account = CloudStorageAccount.parse(storageConnectionString);
serviceClient = account.createCloudBlobClient();
// Container name must be lower case.
container = serviceClient.getContainerReference("blobsample");
container.createIfNotExist();
account = CloudStorageAccount.parse(storageConnectionString);
serviceClient = account.createCloudBlobClient();
// Container name must be lower case.
container = serviceClient.getContainerReference("blobsample");
container.createIfNotExist();

// Set anonymous access on the container.
BlobContainerPermissions containerPermissions;
containerPermissions = new BlobContainerPermissions();

// Upload an image file.
blob = container.getBlockBlobReference("image1.jpg");
File fileReference = new File ("c:\\myimages\\image1.jpg");
blob.upload(new FileInputStream(fileReference), fileReference.length());
}
catch (FileNotFoundException fileNotFoundException)
{
System.out.print("FileNotFoundException encountered: ");
System.out.println(fileNotFoundException.getMessage());
System.exit(-1);
}
catch (StorageException storageException)
{
System.out.print("StorageException encountered: ");
System.out.println(storageException.getMessage());
System.exit(-1);
}
catch (Exception e)
{
System.out.print("Exception encountered: ");
System.out.println(e.getMessage());
System.exit(-1);
}
// Set anonymous access on the container.
BlobContainerPermissions containerPermissions;
containerPermissions = new BlobContainerPermissions();

// Upload an image file.
blob = container.getBlockBlobReference("image1.jpg");
File fileReference = new File ("c:\\myimages\\image1.jpg");
blob.upload(new FileInputStream(fileReference), fileReference.length());
}
catch (FileNotFoundException fileNotFoundException)
{
System.out.print("FileNotFoundException encountered: ");
System.out.println(fileNotFoundException.getMessage());
System.exit(-1);
}
catch (StorageException storageException)
{
System.out.print("StorageException encountered: ");
System.out.println(storageException.getMessage());
System.exit(-1);
}
catch (Exception e)
{
System.out.print("Exception encountered: ");
System.out.println(e.getMessage());
System.exit(-1);
}

}
}
}
</pre></p>

<h1>Need Help?</h1>
<p>Be sure to check out the Windows Azure <a href="http://go.microsoft.com/fwlink/?LinkId=234489">
Developer Forums on Stack Overflow</a> if you have trouble with the provided code.</p>

<h1>Contribute Code or Provide Feedback</h1>
<p>If you would like to become an active contributor to this project please follow the instructions provided in <a href="http://windowsazure.github.com/guidelines.html">Windows Azure Projects Contribution Guidelines</a>.</p>
<p>If you encounter any bugs with the library please file an issue in the <a href="https://github.com/WindowsAzure/azure-sdk-for-java/issues">Issues</a> section of the project.</p>

<h1>Learn More</h1>
<ul>
<li><a href="http://www.windowsazure.com/en-us/develop/java/">Windows Azure Java
Developer Center</a></li>
<li><a href="http://dl.windowsazure.com/javadoc/">
JavaDocs</a></li>
</ul>

#Need Help?

Be sure to check out the Windows Azure [Developer Forums on Stack Overflow](http://go.microsoft.com/fwlink/?LinkId=234489) if you have trouble with the provided code.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines are too long which will look differently on different platform. Especially in VI/VIM, it will be hard to scroll down. The right way is to add a \n at character 80.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't fix. The primary use case for this MD file is to be converted to HTML for display in the browser.


#Contribute Code or Provide Feedback

If you would like to become an active contributor to this project please follow the instructions provided in [Windows Azure Projects Contribution Guidelines](http://windowsazure.github.com/guidelines.html).

If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/WindowsAzure/azure-sdk-for-java/issues) section of the project.

#Learn More

* [Windows Azure Java Developer Center](http://www.windowsazure.com/en-us/develop/java/)
* [JavaDocs](http://dl.windowsazure.com/javadoc/)

Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@
* Copyright 2011 Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.microsoft.windowsazure.services.queue;

/**
* A class that contains static strings used to identify parts of a service configuration instance associated with the
* Windows Azure Queue service.
* <p>
* These values must not be altered.
*/
public class QueueConfiguration {
public final static String ACCOUNT_NAME = "queue.accountName";
public final static String ACCOUNT_KEY = "queue.accountKey";
Expand Down
Loading