public class CloudQueueMessage extends Object
Constructor and Description |
---|
CloudQueueMessage(byte[] content)
Initializes a new instance of the
CloudQueueMessage class with a byte
array containing the message. |
CloudQueueMessage(String content)
Initializes a new instance of the
CloudQueueMessage class with a String
containing the message. |
Modifier and Type | Method and Description |
---|---|
int |
getDequeueCount()
Gets the dequeue count.
|
Date |
getExpirationTime()
Gets the time that the message expires.
|
String |
getId()
Gets the message ID.
|
Date |
getInsertionTime()
Gets the time the message was added to the queue.
|
byte[] |
getMessageContentAsByte()
Gets the content of the message as a byte array.
|
String |
getMessageContentAsString()
Gets the content of the message as a string.
|
String |
getMessageId()
Gets the message ID.
|
Date |
getNextVisibleTime()
Gets the time that the message will next be visible.
|
String |
getPopReceipt()
Gets the message's pop receipt.
|
void |
setMessageContent(byte[] content)
Sets the content of the message as a
byte array. |
void |
setMessageContent(String content)
Sets the content of the message as a
String . |
public CloudQueueMessage(byte[] content)
CloudQueueMessage
class with a byte
array containing the message.content
- A byte
array which contains the message.public CloudQueueMessage(String content)
CloudQueueMessage
class with a String
containing the message.content
- A String
which contains the message.public final int getDequeueCount()
int
which contains the dequeue count.public final Date getExpirationTime()
java.util.Date
object which represents the time that the message expires.public final String getId()
String
which contains the message ID.public final Date getInsertionTime()
java.util.Date
which represents the time the message was added to the queue.public final byte[] getMessageContentAsByte() throws StorageException
byte
array which contains the content of the message.StorageException
- If a storage service error occurred.public final String getMessageContentAsString() throws StorageException
String
which contains the content of the message.StorageException
- If a storage service error occurred.public final String getMessageId()
String
which contains the message ID.public final Date getNextVisibleTime()
java.util.Date
with the time that the message will
next be visible.public final String getPopReceipt()
String
which contains the message's pop receipt.public final void setMessageContent(byte[] content)
byte
array.content
- A byte
array which contains the content of the message.public final void setMessageContent(String content)
String
.content
- A String
which contains the content of the message./**
* Copyright 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
*
* 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.
*/