public class ReceiveMessageOptions extends Object
| Modifier and Type | Field and Description |
|---|---|
static ReceiveMessageOptions |
DEFAULT
Returns a new instance of the
ReceiveMessageOptions class. |
| Constructor and Description |
|---|
ReceiveMessageOptions() |
| Modifier and Type | Method and Description |
|---|---|
ReceiveMode |
getReceiveMode()
Returns the receive mode when receiving messages.
|
Integer |
getTimeout()
Returns the timeout when receiving messages.
|
boolean |
isPeekLock()
Indicates whether the receive mode is peek/lock.
|
boolean |
isReceiveAndDelete()
Indicates whether the receive mode is receive and delete.
|
ReceiveMessageOptions |
setPeekLock()
Sets the receive mode to peek/lock.
|
ReceiveMessageOptions |
setReceiveAndDelete()
Sets the receive mode to receive and delete.
|
ReceiveMessageOptions |
setReceiveMode(ReceiveMode receiveMode)
Sets the receive mode when receiving messages.
|
ReceiveMessageOptions |
setTimeout(Integer timeout)
Sets the timeout when receiving messages.
|
public static final ReceiveMessageOptions DEFAULT
ReceiveMessageOptions class.public Integer getTimeout()
public ReceiveMessageOptions setTimeout(Integer timeout)
timeout - The timeout, in seconds.ReceiveMessageOptions object that represents the
updated receive message options.public ReceiveMode getReceiveMode()
ReceiveMode value that represents the receive mode.public ReceiveMessageOptions setReceiveMode(ReceiveMode receiveMode)
receiveMode - A ReceiveMode value that specifies the receive mode.ReceiveMessageOptions object that represents the
updated receive message options.public boolean isReceiveAndDelete()
true if the receive mode is
ReceiveMode.RECEIVE_AND_DELETE; otherwise,
false.public ReceiveMessageOptions setReceiveAndDelete()
ReceiveMessageOptions object that represents the
updated receive message options.public boolean isPeekLock()
true if the receive mode is
ReceiveMode.PEEK_LOCK; otherwise, false.public ReceiveMessageOptions setPeekLock()
ReceiveMessageOptions object that represents the
updated receive message options./**
* 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.
*/