public class ManagedSubscription extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ManagedSubscription.ChangeListener
A callback that receives data and event change notifications for
ManagedDataItems and
ManagedEventItems belonging to a ManagedSubscription. |
static interface |
ManagedSubscription.StatusListener
A callback that receives status-related notifications for a
ManagedSubscription. |
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_PUBLISHING_INTERVAL |
static org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
DEFAULT_QUEUE_SIZE |
static double |
DEFAULT_SAMPLING_INTERVAL |
| Constructor and Description |
|---|
ManagedSubscription(OpcUaClient client,
OpcUaSubscription subscription) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ManagedSubscription.ChangeListener changeListener)
Add a
ManagedSubscription.ChangeListener to this ManagedSubscription. |
ManagedSubscription.ChangeListener |
addDataChangeListener(BiConsumer<List<ManagedDataItem>,List<org.eclipse.milo.opcua.stack.core.types.builtin.DataValue>> biConsumer)
Add a data
ManagedSubscription.ChangeListener to this ManagedSubscription. |
ManagedSubscription.ChangeListener |
addEventChangeListener(BiConsumer<List<ManagedEventItem>,List<org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]>> biConsumer)
Add an event
ManagedSubscription.ChangeListener to this ManagedSubscription. |
void |
addStatusListener(ManagedSubscription.StatusListener statusListener)
Add a
ManagedSubscription.StatusListener to this ManagedSubscription. |
static ManagedSubscription |
create(OpcUaClient client)
Create a
ManagedSubscription with the default publishing interval. |
static ManagedSubscription |
create(OpcUaClient client,
double publishingInterval)
Create a
ManagedSubscription with the publishing interval specified by publishingInterval. |
static CompletableFuture<ManagedSubscription> |
createAsync(OpcUaClient client,
double publishingInterval)
Create a
ManagedSubscription with the publishing interval specified by publishingInterval. |
ManagedDataItem |
createDataItem(double samplingInterval,
org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId readValueId)
Create a
ManagedDataItem monitoring the Node and Attribute identified by readValueId. |
ManagedDataItem |
createDataItem(double samplingInterval,
org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId readValueId,
Consumer<ManagedDataItem> consumer)
Create a
ManagedDataItem monitoring the Node and Attribute identified by readValueId. |
ManagedDataItem |
createDataItem(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId)
Create a
ManagedDataItem monitoring the Value attribute of the Node identified by nodeId. |
ManagedDataItem |
createDataItem(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId,
Consumer<ManagedDataItem> consumer)
Create a
ManagedDataItem monitoring the Value attribute of the Node identified by nodeId. |
List<ManagedDataItem> |
createDataItems(double samplingInterval,
List<org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId> readValueIds)
Create
ManagedDataItems monitoring the Nodes and Attributes identified by readValueIds. |
List<ManagedDataItem> |
createDataItems(double samplingInterval,
List<org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId> readValueIds,
Consumer<ManagedDataItem> consumer)
Create
ManagedDataItems monitoring the Nodes and Attributes identified by readValueIds. |
List<ManagedDataItem> |
createDataItems(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds)
Create
ManagedDataItems monitoring the Value attribute of the Nodes identified by nodeIds. |
List<ManagedDataItem> |
createDataItems(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds,
Consumer<ManagedDataItem> consumer)
Create
ManagedDataItems monitoring the Value attribute of the Nodes identified by nodeIds. |
CompletableFuture<List<ManagedDataItem>> |
createDataItemsAsync(double samplingInterval,
List<org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId> readValueIds)
Create
ManagedDataItems monitoring the Nodes and Attributes identified by readValueIds. |
CompletableFuture<List<ManagedDataItem>> |
createDataItemsAsync(double samplingInterval,
List<org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId> readValueIds,
Consumer<ManagedDataItem> consumer)
Create
ManagedDataItems monitoring the Nodes and Attributes identified by readValueIds. |
ManagedEventItem |
createEventItem(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId,
org.eclipse.milo.opcua.stack.core.types.structured.EventFilter eventFilter)
Create a
ManagedEventItem. |
ManagedEventItem |
createEventItem(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId,
org.eclipse.milo.opcua.stack.core.types.structured.EventFilter eventFilter,
Consumer<ManagedEventItem> consumer)
Create a
ManagedEventItem. |
List<ManagedEventItem> |
createEventItems(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds,
List<org.eclipse.milo.opcua.stack.core.types.structured.EventFilter> eventFilters)
Create one or more
ManagedEventItems. |
List<ManagedEventItem> |
createEventItems(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds,
List<org.eclipse.milo.opcua.stack.core.types.structured.EventFilter> eventFilters,
Consumer<ManagedEventItem> consumer)
Create one or more
ManagedEventItems. |
CompletableFuture<List<ManagedEventItem>> |
createEventItemsAsync(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds,
List<org.eclipse.milo.opcua.stack.core.types.structured.EventFilter> eventFilters)
Create one or more
ManagedEventItems. |
CompletableFuture<List<ManagedEventItem>> |
createEventItemsAsync(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds,
List<org.eclipse.milo.opcua.stack.core.types.structured.EventFilter> eventFilters,
Consumer<ManagedEventItem> consumer)
Create one or more
ManagedEventItems. |
void |
delete()
Delete this
ManagedSubscription and its underlying OpcUaSubscription. |
CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> |
deleteAsync()
Delete this
ManagedSubscription and its underlying OpcUaSubscription. |
void |
deleteDataItem(ManagedDataItem dataItem)
Delete a
ManagedDataItem. |
CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> |
deleteDataItemAsync(ManagedDataItem dataItem)
Delete a
ManagedDataItem. |
void |
deleteDataItems(List<ManagedDataItem> dataItems)
Delete one or more
ManagedDataItems. |
CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> |
deleteDataItemsAsync(List<ManagedDataItem> dataItemsToDelete)
Delete one or more
ManagedDataItems. |
void |
deleteEventItem(ManagedEventItem eventItem)
Delete a
ManagedEventItem. |
CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> |
deleteEventItemAsync(ManagedEventItem eventItem)
Delete a
ManagedEventItem. |
void |
deleteEventItems(List<ManagedEventItem> eventItems)
Delete one or more
ManagedEventItems. |
CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> |
deleteEventItemsAsync(List<ManagedEventItem> eventItemsToDelete)
Delete one or more
ManagedEventItems. |
OpcUaClient |
getClient()
Get the
OpcUaClient that created this ManagedSubscription. |
List<ManagedDataItem> |
getDataItems()
Get a copied List of the current
ManagedDataItems. |
@Nullable org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject |
getDefaultDataFilter()
Get the encoded
DataChangeFilter used when creating ManagedDataItems. |
boolean |
getDefaultDiscardOldest()
Get the default discard policy used when creating
ManagedDataItems and ManagedEventItems. |
org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode |
getDefaultMonitoringMode()
Get the default
MonitoringMode new items will be created in. |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
getDefaultQueueSize()
Get the queue size used when creating
ManagedDataItems. |
double |
getDefaultSamplingInterval()
Get the sampling interval used in calls where it is not specified explicitly.
|
org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn |
getDefaultTimestamps()
Get the default
TimestampsToReturn used when creating ManagedDataItems. |
List<ManagedEventItem> |
getEventItems()
Get a copied List of the current
ManagedEventItems. |
double |
getPublishingInterval()
Get this Subscription's current publishing interval.
|
OpcUaSubscription |
getSubscription()
Get the underlying
OpcUaSubscription. |
boolean |
isPublishingEnabled()
Get this Subscription's current publishing mode.
|
boolean |
removeChangeListener(ManagedSubscription.ChangeListener changeListener)
Remove a
ManagedSubscription.ChangeListener from this ManagedSubscription. |
boolean |
removeStatusListener(ManagedSubscription.StatusListener statusListener)
Remove a
ManagedSubscription.StatusListener from this ManagedSubscription. |
void |
setDefaultDataFilter(@Nullable org.eclipse.milo.opcua.stack.core.types.structured.DataChangeFilter defaultDataFilter)
Set the
DataChangeFilter used when creating ManagedDataItems. |
void |
setDefaultDiscardOldest(boolean defaultDiscardOldest)
Set the default discard policy used when creating
ManagedDataItems and ManagedEventItems. |
void |
setDefaultMonitoringMode(org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode defaultMonitoringMode)
Set the new default
MonitoringMode new items will be created in. |
void |
setDefaultQueueSize(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger defaultQueueSize)
Set the queue size used when creating
ManagedDataItems. |
void |
setDefaultSamplingInterval(double defaultSamplingInterval)
Set the sampling interval used in calls where it is not specified explicitly.
|
void |
setDefaultTimestamps(org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn defaultTimestamps)
Set the default
TimestampsToReturn used when creating ManagedDataItems. |
void |
setPublishingEnabled(boolean enabled)
Set this Subscription's publishing mode.
|
CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> |
setPublishingEnabledAsync(boolean enabled)
Set this Subscription's publishing mode.
|
double |
setPublishingInterval(double publishingInterval)
Request a new publishing interval for this Subscription.
|
CompletableFuture<Double> |
setPublishingIntervalAsync(double publishingInterval)
Request a new publishing interval for this Subscription.
|
public static final double DEFAULT_PUBLISHING_INTERVAL
public static final double DEFAULT_SAMPLING_INTERVAL
public static final org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger DEFAULT_QUEUE_SIZE
public ManagedSubscription(OpcUaClient client, OpcUaSubscription subscription)
public OpcUaClient getClient()
OpcUaClient that created this ManagedSubscription.OpcUaClient that created this ManagedSubscription.public OpcUaSubscription getSubscription()
OpcUaSubscription.OpcUaSubscription.public List<ManagedDataItem> getDataItems()
ManagedDataItems.ManagedDataItems.public List<ManagedEventItem> getEventItems()
ManagedEventItems.ManagedEventItems.public ManagedDataItem createDataItem(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItem monitoring the Value attribute of the Node identified by nodeId.
The operation will fail of the Node is not a Variable or VariableType Node. To create an item that monitors a
different attribute use createDataItem(double, ReadValueId).
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
nodeId - the NodeId identifying a Variable or VariableType Node.ManagedDataItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public ManagedDataItem createDataItem(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, Consumer<ManagedDataItem> consumer) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItem monitoring the Value attribute of the Node identified by nodeId.
The operation will fail of the Node is not a Variable or VariableType Node. To create an item that monitors a
different attribute use createDataItem(double, ReadValueId).
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
nodeId - the NodeId identifying a Variable or VariableType Node.consumer - a Consumer that will receive each item as it is created.ManagedDataItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public List<ManagedDataItem> createDataItems(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItems monitoring the Value attribute of the Nodes identified by nodeIds.
This operation will fail of the Node is not a Variable or VariableType Node. To create items that monitor
different attributes use createDataItems(double, List).
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
nodeIds - the NodeIds identifying a Variable or VariableType Nodes.ManagedDataItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public List<ManagedDataItem> createDataItems(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds, Consumer<ManagedDataItem> consumer) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItems monitoring the Value attribute of the Nodes identified by nodeIds.
This operation will fail of the Node is not a Variable or VariableType Node. To create items that monitor
different attributes use createDataItems(double, List).
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
nodeIds - the NodeIds identifying a Variable or VariableType Nodes.consumer - a Consumer that will receive each item as it is created.ManagedDataItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public ManagedDataItem createDataItem(double samplingInterval, org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId readValueId) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItem monitoring the Node and Attribute identified by readValueId.
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
samplingInterval - the sampling interval to request.readValueId - the ReadValueId identifying the Node and Attribute.ManagedDataItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public ManagedDataItem createDataItem(double samplingInterval, org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId readValueId, Consumer<ManagedDataItem> consumer) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItem monitoring the Node and Attribute identified by readValueId.
consumer will receive each item as it is created to provide an opportunity to add a
ManagedDataItem.DataValueListener before the first value change has arrived.
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
samplingInterval - the sampling interval to request.readValueId - the ReadValueId identifying the Node and Attribute.consumer - a Consumer that will receive each item as it is created.ManagedDataItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public List<ManagedDataItem> createDataItems(double samplingInterval, List<org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId> readValueIds) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItems monitoring the Nodes and Attributes identified by readValueIds.
The operation results should be checked before each item is used further.
See ManagedItem.getStatusCode().
samplingInterval - the sampling interval to request.readValueIds - the ReadValueIds identifying the Nodes and Attributes.ManagedDataItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public List<ManagedDataItem> createDataItems(double samplingInterval, List<org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId> readValueIds, Consumer<ManagedDataItem> consumer) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItems monitoring the Nodes and Attributes identified by readValueIds.
consumer will receive each item as it is created to provide an opportunity to add a
ManagedDataItem.DataValueListener before the first value change has arrived.
The operation results should be checked before each item is used further.
See ManagedItem.getStatusCode().
samplingInterval - the sampling interval to request.readValueIds - the ReadValueIds identifying the Nodes and Attributes.consumer - a Consumer that will receive each item as it is created.ManagedDataItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public CompletableFuture<List<ManagedDataItem>> createDataItemsAsync(double samplingInterval, List<org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId> readValueIds)
ManagedDataItems monitoring the Nodes and Attributes identified by readValueIds.
The operation results should be checked before each item is used further.
See ManagedItem.getStatusCode().
This call completes asynchronously.
samplingInterval - the sampling interval to request.readValueIds - the ReadValueIds identifying the Nodes and Attributes.CompletableFuture that completes successfully with a List of ManagedDataItem or
completes exceptionally if a service-level error occurs.public CompletableFuture<List<ManagedDataItem>> createDataItemsAsync(double samplingInterval, List<org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId> readValueIds, Consumer<ManagedDataItem> consumer)
ManagedDataItems monitoring the Nodes and Attributes identified by readValueIds.
consumer will receive each item as it is created to provide an opportunity to add a
ManagedDataItem.DataValueListener before the first value change has arrived.
The operation results should be checked before each item is used further.
See ManagedItem.getStatusCode().
This call completes asynchronously.
samplingInterval - the sampling interval to request.readValueIds - the ReadValueIds identifying the Nodes and Attributes.consumer - a Consumer that will receive each item as it is created.CompletableFuture that completes successfully with a List of ManagedDataItem or
completes exceptionally if a service-level error occurs.public void deleteDataItem(ManagedDataItem dataItem) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItem.
The result of the delete operation can be obtained via ManagedItem.getStatusCode().
dataItem - the ManagedDataItem to delete.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public void deleteDataItems(List<ManagedDataItem> dataItems) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedDataItems.
The result of the delete operations can be obtained via ManagedItem.getStatusCode().
dataItems - the ManagedDataItems to delete.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> deleteDataItemAsync(ManagedDataItem dataItem)
ManagedDataItem.
The result of the delete operation can be obtained via ManagedItem.getStatusCode().
This call completes asynchronously.
dataItem - the ManagedDataItem to delete.CompletableFuture that completes successfully if the service completed successfully or
completes exceptionally if a service-level error occurs.public CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> deleteDataItemsAsync(List<ManagedDataItem> dataItemsToDelete)
ManagedDataItems.
The result of the delete operations can be obtained via ManagedItem.getStatusCode().
This call completes asynchronously.
dataItemsToDelete - the ManagedDataItems to delete.CompletableFuture that completes successfully if the service completed successfully or
completes exceptionally if a service-level error occurs.public ManagedEventItem createEventItem(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.structured.EventFilter eventFilter) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedEventItem.
This operation will fail of the Node identified by nodeId is not an Object Node.
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
nodeId - the NodeId identifying an Object Node.eventFilter - the EventFilter to use.ManagedEventItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.EventFilterBuilderpublic ManagedEventItem createEventItem(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.structured.EventFilter eventFilter, Consumer<ManagedEventItem> consumer) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedEventItem.
This operation will fail of the Node identified by nodeId is not an Object Node.
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
nodeId - the NodeId identifying an Object Node.eventFilter - the EventFilter to use.consumer - a Consumer that will receive each item as it is created.ManagedEventItem.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.EventFilterBuilderpublic List<ManagedEventItem> createEventItems(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds, List<org.eclipse.milo.opcua.stack.core.types.structured.EventFilter> eventFilters) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedEventItems.
This operation will fail of the Node identified by nodeId is not an Object Node.
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
nodeIds - the NodeIds identifying Object Nodes.eventFilters - the corresponding EventFilter to create each item with.ManagedEventItems.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public List<ManagedEventItem> createEventItems(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds, List<org.eclipse.milo.opcua.stack.core.types.structured.EventFilter> eventFilters, Consumer<ManagedEventItem> consumer) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedEventItems.
This operation will fail of the Node identified by nodeId is not an Object Node.
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
nodeIds - the NodeIds identifying Object Nodes.eventFilters - the corresponding EventFilter to create each item with.consumer - a Consumer that will receive each item as it is created.ManagedEventItems.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public CompletableFuture<List<ManagedEventItem>> createEventItemsAsync(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds, List<org.eclipse.milo.opcua.stack.core.types.structured.EventFilter> eventFilters)
ManagedEventItems.
This operation will fail of the Node identified by nodeId is not an Object Node.
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
This operation completes asynchronously.
nodeIds - the NodeIds identifying Object Nodes.eventFilters - the corresponding EventFilter to create each item with.CompletableFuture that completes successfully with the List of ManagedEventItems or
completes exceptionally if a service-level error occurs.public CompletableFuture<List<ManagedEventItem>> createEventItemsAsync(List<org.eclipse.milo.opcua.stack.core.types.builtin.NodeId> nodeIds, List<org.eclipse.milo.opcua.stack.core.types.structured.EventFilter> eventFilters, Consumer<ManagedEventItem> consumer)
ManagedEventItems.
This operation will fail of the Node identified by nodeId is not an Object Node.
The operation result should be checked before this item is used further.
See ManagedItem.getStatusCode().
This operation completes asynchronously.
nodeIds - the NodeIds identifying Object Nodes.eventFilters - the corresponding EventFilter to create each item with.consumer - a Consumer that will receive each item as it is created.CompletableFuture that completes successfully with the List of ManagedEventItems or
completes exceptionally if a service-level error occurs.public void deleteEventItem(ManagedEventItem eventItem) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedEventItem.
The result of the delete operation can be obtained via ManagedItem.getStatusCode().
eventItem - the ManagedEventItem to delete.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public void deleteEventItems(List<ManagedEventItem> eventItems) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedEventItems.
The result of the delete operations can be obtained via ManagedItem.getStatusCode().
eventItems - the ManagedEventItems to delete.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> deleteEventItemAsync(ManagedEventItem eventItem)
ManagedEventItem.
The result of the delete operation can be obtained via ManagedItem.getStatusCode().
This call completes asynchronously.
eventItem - the ManagedEventItem to delete.CompletableFuture that completes successfully if the service completed successfully or
completes exceptionally if a service-level error occurs.public CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> deleteEventItemsAsync(List<ManagedEventItem> eventItemsToDelete)
ManagedEventItems.
The result of the delete operations can be obtained via ManagedItem.getStatusCode().
This call completes asynchronously.
eventItemsToDelete - the ManagedEventItems to delete.CompletableFuture that completes successfully if the service completed successfully or
completes exceptionally if a service-level error occurs.public double getPublishingInterval()
public double setPublishingInterval(double publishingInterval)
throws org.eclipse.milo.opcua.stack.core.UaException
publishingInterval - the requested publishing interval.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public CompletableFuture<Double> setPublishingIntervalAsync(double publishingInterval)
This call completes asynchronously.
publishingInterval - the requested publishing interval.CompletableFuture that completes successfully with the new publishing interval or completes
exceptionally if a service-level error occurs.public boolean isPublishingEnabled()
true if publishing is enabled, false if publishing is disabled.public void setPublishingEnabled(boolean enabled)
throws org.eclipse.milo.opcua.stack.core.UaException
enabled - true to enable publishing, false to disable publishing.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> setPublishingEnabledAsync(boolean enabled)
enabled - true to enable publishing, false to disable publishing.CompletableFuture that completes successfully if the publishing mode was set or completes
exceptionally if a service-level error occurs.public org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode getDefaultMonitoringMode()
MonitoringMode new items will be created in.MonitoringMode new items will be created in.public void setDefaultMonitoringMode(org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode defaultMonitoringMode)
MonitoringMode new items will be created in.defaultMonitoringMode - the new default MonitoringMode new items will be created in.public double getDefaultSamplingInterval()
public void setDefaultSamplingInterval(double defaultSamplingInterval)
defaultSamplingInterval - the sampling interval used in calls where it is not specified explicitly.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getDefaultQueueSize()
ManagedDataItems.ManagedDataItems.public void setDefaultQueueSize(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger defaultQueueSize)
ManagedDataItems.defaultQueueSize - the queue size used when creating ManagedDataItems.@Nullable public @Nullable org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject getDefaultDataFilter()
DataChangeFilter used when creating ManagedDataItems.DataChangeFilter used when creating ManagedDataItems.public void setDefaultDataFilter(@Nullable
@Nullable org.eclipse.milo.opcua.stack.core.types.structured.DataChangeFilter defaultDataFilter)
DataChangeFilter used when creating ManagedDataItems.
The default value is null, which is interpreted by servers as a filter triggered by changes in Status
or Value with no deadband applied.
defaultDataFilter - the DataChangeFilter to use when creating ManagedDataItems.public org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn getDefaultTimestamps()
TimestampsToReturn used when creating ManagedDataItems.TimestampsToReturn used when creating ManagedDataItems.public void setDefaultTimestamps(org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn defaultTimestamps)
TimestampsToReturn used when creating ManagedDataItems.defaultTimestamps - the default TimestampsToReturn used when creating ManagedDataItems.public boolean getDefaultDiscardOldest()
ManagedDataItems and ManagedEventItems.ManagedDataItems and ManagedEventItems.public void setDefaultDiscardOldest(boolean defaultDiscardOldest)
ManagedDataItems and ManagedEventItems.defaultDiscardOldest - the default discard policy used when creating ManagedDataItems and
ManagedEventItems.public void addChangeListener(ManagedSubscription.ChangeListener changeListener)
ManagedSubscription.ChangeListener to this ManagedSubscription.changeListener - the ManagedSubscription.ChangeListener to add.public boolean removeChangeListener(ManagedSubscription.ChangeListener changeListener)
ManagedSubscription.ChangeListener from this ManagedSubscription.changeListener - the ManagedSubscription.ChangeListener to remove.true if the listener was removed.public void addStatusListener(ManagedSubscription.StatusListener statusListener)
ManagedSubscription.StatusListener to this ManagedSubscription.statusListener - the ManagedSubscription.StatusListener to add.public boolean removeStatusListener(ManagedSubscription.StatusListener statusListener)
ManagedSubscription.StatusListener from this ManagedSubscription.statusListener - the ManagedSubscription.StatusListener to remove.true if the listener was removed.public ManagedSubscription.ChangeListener addDataChangeListener(BiConsumer<List<ManagedDataItem>,List<org.eclipse.milo.opcua.stack.core.types.builtin.DataValue>> biConsumer)
ManagedSubscription.ChangeListener to this ManagedSubscription.
biConsumer will be invoked when new values for ManagedDataItems have arrived via
ManagedSubscription.ChangeListener.onDataReceived(List, List).
The listener is transformed into the returned ManagedSubscription.ChangeListener that can later be removed.
biConsumer - a BiConsumer that will be invoked when new values for ManagedDataItems have
arrived.ManagedSubscription.ChangeListener that can later be removed.public ManagedSubscription.ChangeListener addEventChangeListener(BiConsumer<List<ManagedEventItem>,List<org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]>> biConsumer)
ManagedSubscription.ChangeListener to this ManagedSubscription.
biConsumer will be invoked when new events for ManagedEventItems have arrived via
ManagedSubscription.ChangeListener.onEventReceived(List, List).
The listener is transformed into the returned ManagedSubscription.ChangeListener that can later be removed.
biConsumer - a BiConsumer that will be invoked when new events for ManagedEventItems have
arrived.ManagedSubscription.ChangeListener that can later be removed.public void delete()
throws org.eclipse.milo.opcua.stack.core.UaException
ManagedSubscription and its underlying OpcUaSubscription.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs.public CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> deleteAsync()
ManagedSubscription and its underlying OpcUaSubscription.
This call completes asynchronously.
CompletableFuture that completes successfully if the service completed successfully or
completes exceptionally if a service-level error occurs.public static ManagedSubscription create(OpcUaClient client) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedSubscription with the default publishing interval.client - the OpcUaClient instance to create the subscription with.ManagedSubscription.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs preventing the subscription from being created.DEFAULT_PUBLISHING_INTERVALpublic static ManagedSubscription create(OpcUaClient client, double publishingInterval) throws org.eclipse.milo.opcua.stack.core.UaException
ManagedSubscription with the publishing interval specified by publishingInterval.client - the OpcUaClient instance to create the subscription with.publishingInterval - the publishing interval to request when creating the subscription.ManagedSubscription.org.eclipse.milo.opcua.stack.core.UaException - if a service-level error occurs preventing the subscription from being created.public static CompletableFuture<ManagedSubscription> createAsync(OpcUaClient client, double publishingInterval)
ManagedSubscription with the publishing interval specified by publishingInterval.
This call completes asynchronously.
client - the OpcUaClient instance to create the subscription with.publishingInterval - the publishing interval to request when creating the subscription.CompletableFuture that completes successfully with the new subscription or completes
exceptionally if a service-level error occurs preventing the subscription from being created.Copyright © 2021. All rights reserved.