azure-docs-sdk-java/legacy/docs-ref-autogen/com.microsoft.azure.service...

125 строки
10 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.azure.servicebus.IMessageSession"
fullName: "com.microsoft.azure.servicebus.IMessageSession"
name: "IMessageSession"
nameWithType: "IMessageSession"
summary: "Describes a Session object."
syntax: "public interface **IMessageSession**</br> extends <xref href=\"com.microsoft.azure.servicebus.IMessageReceiver?alt=com.microsoft.azure.servicebus.IMessageReceiver&text=IMessageReceiver\" data-throw-if-not-resolved=\"False\" />"
methods:
- uid: "com.microsoft.azure.servicebus.IMessageSession.getLockedUntilUtc()"
fullName: "com.microsoft.azure.servicebus.IMessageSession.getLockedUntilUtc()"
name: "getLockedUntilUtc()"
nameWithType: "IMessageSession.getLockedUntilUtc()"
modifiers:
- "abstract"
syntax: "public abstract Instant getLockedUntilUtc()"
returns:
description: "Gets the time that the session identified by <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getSessionId()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getSessionId()\"></xref> is locked until for this client."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html\">Instant</a>"
- uid: "com.microsoft.azure.servicebus.IMessageSession.getSessionId()"
fullName: "com.microsoft.azure.servicebus.IMessageSession.getSessionId()"
name: "getSessionId()"
nameWithType: "IMessageSession.getSessionId()"
modifiers:
- "abstract"
syntax: "public abstract String getSessionId()"
returns:
description: "Gets the SessionId."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.microsoft.azure.servicebus.IMessageSession.getState()"
fullName: "com.microsoft.azure.servicebus.IMessageSession.getState()"
name: "getState()"
nameWithType: "IMessageSession.getState()"
summary: "Gets the session state."
modifiers:
- "abstract"
syntax: "public abstract byte[] getState()"
exceptions:
- description: "if the current thread was interrupted while waiting"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
- description: "if the current thread was interrupted while waiting"
type: "<xref href=\"com.microsoft.azure.servicebus.primitives.ServiceBusException?alt=com.microsoft.azure.servicebus.primitives.ServiceBusException&text=ServiceBusException\" data-throw-if-not-resolved=\"False\" />"
desc: "Gets the session state."
returns:
description: "The session state"
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
- uid: "com.microsoft.azure.servicebus.IMessageSession.getStateAsync()"
fullName: "com.microsoft.azure.servicebus.IMessageSession.getStateAsync()"
name: "getStateAsync()"
nameWithType: "IMessageSession.getStateAsync()"
summary: "Asynchronously gets the session state."
modifiers:
- "abstract"
syntax: "public abstract CompletableFuture<byte[]> getStateAsync()"
desc: "Asynchronously gets the session state."
returns:
description: "a CompletableFuture representing the pending session state retrieving."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a>&lt;<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]&gt;"
- uid: "com.microsoft.azure.servicebus.IMessageSession.renewSessionLock()"
fullName: "com.microsoft.azure.servicebus.IMessageSession.renewSessionLock()"
name: "renewSessionLock()"
nameWithType: "IMessageSession.renewSessionLock()"
summary: "Renews the lock on the session specified by the <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getSessionId()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getSessionId()\"></xref>."
modifiers:
- "abstract"
syntax: "public abstract void renewSessionLock()"
exceptions:
- description: "if the current thread was interrupted while waiting"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
- description: "if the current thread was interrupted while waiting"
type: "<xref href=\"com.microsoft.azure.servicebus.primitives.ServiceBusException?alt=com.microsoft.azure.servicebus.primitives.ServiceBusException&text=ServiceBusException\" data-throw-if-not-resolved=\"False\" />"
desc: "Renews the lock on the session specified by the <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getSessionId()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getSessionId()\"></xref>. The lock will be renewed based on the setting specified on the entity.\n\nWhen you accept a session, the session is locked for this client instance by the service for a duration as specified during the Queue/Subscription creation. If processing of the session requires longer than this duration, the session-lock needs to be renewed. For each renewal, the session-lock is renewed by the entity's LockDuration.\n\nRenewal of session renews all the messages in the session as well. Each individual message need not be renewed."
- uid: "com.microsoft.azure.servicebus.IMessageSession.renewSessionLockAsync()"
fullName: "com.microsoft.azure.servicebus.IMessageSession.renewSessionLockAsync()"
name: "renewSessionLockAsync()"
nameWithType: "IMessageSession.renewSessionLockAsync()"
summary: "Renews the lock on the session specified by the <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getSessionId()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getSessionId()\"></xref>."
modifiers:
- "abstract"
syntax: "public abstract CompletableFuture<Void> renewSessionLockAsync()"
desc: "Renews the lock on the session specified by the <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getSessionId()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getSessionId()\"></xref>. The lock will be renewed based on the setting specified on the entity."
returns:
description: "a CompletableFuture representing the pending renew."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.microsoft.azure.servicebus.IMessageSession.setState(byte[])"
fullName: "com.microsoft.azure.servicebus.IMessageSession.setState(byte[] state)"
name: "setState(byte[] state)"
nameWithType: "IMessageSession.setState(byte[] state)"
summary: "Set a custom state on the session which can be later retrieved using <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getState()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getState()\"></xref>."
modifiers:
- "abstract"
parameters:
- description: "The session state."
name: "state"
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
syntax: "public abstract void setState(byte[] state)"
exceptions:
- description: "if the current thread was interrupted while waiting"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
- description: "if the current thread was interrupted while waiting"
type: "<xref href=\"com.microsoft.azure.servicebus.primitives.ServiceBusException?alt=com.microsoft.azure.servicebus.primitives.ServiceBusException&text=ServiceBusException\" data-throw-if-not-resolved=\"False\" />"
desc: "Set a custom state on the session which can be later retrieved using <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getState()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getState()\"></xref>."
- uid: "com.microsoft.azure.servicebus.IMessageSession.setStateAsync(byte[])"
fullName: "com.microsoft.azure.servicebus.IMessageSession.setStateAsync(byte[] state)"
name: "setStateAsync(byte[] state)"
nameWithType: "IMessageSession.setStateAsync(byte[] state)"
summary: "Asynchronously set a custom state on the session which can be later retrieved using <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getState()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getState()\"></xref>."
modifiers:
- "abstract"
parameters:
- description: "The session state."
name: "state"
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
syntax: "public abstract CompletableFuture<Void> setStateAsync(byte[] state)"
desc: "Asynchronously set a custom state on the session which can be later retrieved using <xref uid=\"com.microsoft.azure.servicebus.IMessageSession.getState()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"IMessageSession#getState()\"></xref>."
returns:
description: "a CompletableFuture representing the pending session state setting."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
type: "interface"
desc: "Describes a Session object. IMessageSession can be used to perform operations on sessions.\n\nService Bus Sessions, also called 'Groups' in the AMQP 1.0 protocol, are unbounded sequences of related messages. ServiceBus guarantees ordering of messages in a session.\n\nAny sender can create a session when submitting messages into a Topic or Queue by setting the <xref uid=\"com.microsoft.azure.servicebus.Message.sessionId\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Message#sessionId\"></xref> property on Message to some application defined unique identifier. At the AMQP 1.0 protocol level, this value maps to the group-id property.\n\nSessions come into existence when there is at least one message with the session's SessionId in the Queue or Topic subscription. Once a Session exists, there is no defined moment or gesture for when the session expires or disappears."
implements:
- "<xref href=\"com.microsoft.azure.servicebus.IMessageReceiver?alt=com.microsoft.azure.servicebus.IMessageReceiver&text=IMessageReceiver\" data-throw-if-not-resolved=\"False\" />"
metadata: {}
package: "com.microsoft.azure.servicebus"
artifact: com.microsoft.azure:azure-servicebus:3.6.7