<%@ page import="com.microsoft.windowsazure.services.core.storage.*" %> <%@ page import="com.microsoft.windowsazure.services.queue.client.*" %> <html> <head> <title>ThaiCreate.Com Azure Tutorial</title> </head> <body> <% String storageConnectionString = "DefaultEndpointsProtocol=http;" + "AccountName=[yourAccount];" + "AccountKey=[yourKey]"; // Retrieve storage account from connection-string CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString); // Create the queue client CloudQueueClient queueClient = storageAccount.createCloudQueueClient(); // Retrieve a reference to a queue CloudQueue queue = queueClient.getQueueReference("myqueue"); // Create the queue if it doesn't already exist queue.createIfNotExist(); out.print("Queue 'myqueue' has been created."); %> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท