public class OpcUaSubscriptionManager extends Object implements UaSubscriptionManager
UaSubscriptionManager.SubscriptionListener| Modifier and Type | Field and Description |
|---|---|
static org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
DEFAULT_MAX_NOTIFICATIONS_PER_PUBLISH |
| Constructor and Description |
|---|
OpcUaSubscriptionManager(OpcUaClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSubscriptionListener(UaSubscriptionManager.SubscriptionListener listener)
|
void |
clearSubscriptions() |
CompletableFuture<UaSubscription> |
createSubscription(double requestedPublishingInterval)
Create a
UaSubscription using default parameters. |
CompletableFuture<UaSubscription> |
createSubscription(double requestedPublishingInterval,
BiFunction<Double,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> getLifetimeCount,
Function<Double,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> getMaxKeepAliveCount,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish,
boolean publishingEnabled,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
Create a
UaSubscription. |
CompletableFuture<UaSubscription> |
createSubscription(double requestedPublishingInterval,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestedLifetimeCount,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestedMaxKeepAliveCount,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish,
boolean publishingEnabled,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
Create a
UaSubscription. |
CompletableFuture<UaSubscription> |
deleteSubscription(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId)
Delete a
UaSubscription. |
com.google.common.collect.ImmutableList<UaSubscription> |
getSubscriptions() |
CompletableFuture<UaSubscription> |
modifySubscription(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId,
double requestedPublishingInterval)
Request a new publishing interval for a
UaSubscription. |
CompletableFuture<UaSubscription> |
modifySubscription(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId,
double requestedPublishingInterval,
BiFunction<Double,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> getLifetimeCount,
Function<Double,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> getMaxKeepAliveCount,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
Modify a
UaSubscription. |
CompletableFuture<UaSubscription> |
modifySubscription(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId,
double requestedPublishingInterval,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestedLifetimeCount,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestedMaxKeepAliveCount,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
Modify a
UaSubscription. |
void |
pauseDelivery() |
void |
removeSubscriptionListener(UaSubscriptionManager.SubscriptionListener listener)
|
void |
resumeDelivery() |
void |
startPublishing() |
void |
transferFailed(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId,
org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode statusCode) |
public static final org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger DEFAULT_MAX_NOTIFICATIONS_PER_PUBLISH
public OpcUaSubscriptionManager(OpcUaClient client)
public CompletableFuture<UaSubscription> createSubscription(double requestedPublishingInterval)
UaSubscriptionManagerUaSubscription using default parameters.
The requested max keep-alive count and lifetime count will be derived from the requested publishing interval.
createSubscription in interface UaSubscriptionManagerrequestedPublishingInterval - the requested publishing interval of the subscription.CompletableFuture containing the UaSubscription.public CompletableFuture<UaSubscription> createSubscription(double requestedPublishingInterval, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestedLifetimeCount, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestedMaxKeepAliveCount, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish, boolean publishingEnabled, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
UaSubscriptionManagerUaSubscription.createSubscription in interface UaSubscriptionManagerrequestedPublishingInterval - the requested publishing interval.requestedLifetimeCount - the requested lifetime count.requestedMaxKeepAliveCount - the requested max keep-alive count.maxNotificationsPerPublish - the maximum number of notifications allowed in a publish response.publishingEnabled - true if publishing is enabled for the subscription.priority - the relative priority to assign to the subscription.CompletableFuture containing the UaSubscription.public CompletableFuture<UaSubscription> createSubscription(double requestedPublishingInterval, BiFunction<Double,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> getLifetimeCount, Function<Double,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> getMaxKeepAliveCount, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish, boolean publishingEnabled, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
UaSubscriptionManagerUaSubscription.
This overload uses provided functions to calculate keep-alive and lifetime counts. They may be called more than once, with revised values, in order to modify the subscription if the server revises the requested publishing interval.
createSubscription in interface UaSubscriptionManagerrequestedPublishingInterval - the requested publishing interval.getLifetimeCount - function returning lifetime count given publishing interval and
keep-alive count.getMaxKeepAliveCount - function returning max keep-alive count given publishing interval.maxNotificationsPerPublish - the maximum number of notifications allowed in a publish response.publishingEnabled - true if publishing is enabled for the subscription.priority - the relative priority to assign to the subscription.CompletableFuture containing the UaSubscription.public CompletableFuture<UaSubscription> modifySubscription(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId, double requestedPublishingInterval)
UaSubscriptionManagerUaSubscription.
The requested max keep-alive count and lifetime count will be derived from the requested publishing interval.
modifySubscription in interface UaSubscriptionManagersubscriptionId - the server-assigned id of the UaSubscription to modify.requestedPublishingInterval - the requested publishing interval.CompletableFuture containing the UaSubscription.public CompletableFuture<UaSubscription> modifySubscription(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId, double requestedPublishingInterval, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestedLifetimeCount, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestedMaxKeepAliveCount, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
UaSubscriptionManagerUaSubscription.modifySubscription in interface UaSubscriptionManagersubscriptionId - the server-assigned id of the UaSubscription to modify.requestedPublishingInterval - the requested publishing interval.requestedLifetimeCount - the requested lifetime count.requestedMaxKeepAliveCount - the requested max keep-alive count.maxNotificationsPerPublish - the maximum number of notifications allowed in a publish response.priority - the relative priority to assign to the subscription.CompletableFuture containing the UaSubscription.public CompletableFuture<UaSubscription> modifySubscription(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId, double requestedPublishingInterval, BiFunction<Double,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> getLifetimeCount, Function<Double,org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> getMaxKeepAliveCount, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
UaSubscriptionManagerUaSubscription.
This overload uses provided functions to calculate keep-alive and lifetime counts. They may be called more than once, with revised values, in order to modify the subscription if the server revises the requested publishing interval.
modifySubscription in interface UaSubscriptionManagersubscriptionId - the server-assigned id of the UaSubscription to modify.requestedPublishingInterval - the requested publishing interval.getLifetimeCount - function returning lifetime count given publishing interval and
keep-alive count.getMaxKeepAliveCount - function returning max keep-alive count given publishing interval.maxNotificationsPerPublish - the maximum number of notifications allowed in a publish response.priority - the relative priority to assign to the subscription.CompletableFuture containing the UaSubscription.public CompletableFuture<UaSubscription> deleteSubscription(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId)
UaSubscriptionManagerUaSubscription.deleteSubscription in interface UaSubscriptionManagersubscriptionId - the server-assigned id of the UaSubscription to delete.CompletableFuture containing the deleted UaSubscription.public void transferFailed(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId,
org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode statusCode)
public com.google.common.collect.ImmutableList<UaSubscription> getSubscriptions()
getSubscriptions in interface UaSubscriptionManagerImmutableList of UaSubscriptions managed by this UaSubscriptionManager.public void addSubscriptionListener(UaSubscriptionManager.SubscriptionListener listener)
UaSubscriptionManageraddSubscriptionListener in interface UaSubscriptionManagerlistener - the UaSubscriptionManager.SubscriptionListener to add.public void removeSubscriptionListener(UaSubscriptionManager.SubscriptionListener listener)
UaSubscriptionManagerremoveSubscriptionListener in interface UaSubscriptionManagerlistener - the UaSubscriptionManager.SubscriptionListener to remove.public void startPublishing()
public void clearSubscriptions()
public void pauseDelivery()
public void resumeDelivery()
Copyright © 2021. All rights reserved.