public class Subscription extends SubscriptionBase
Use PublishingInterval to define the sampling frequency in the server. LifeTimeCount and MaxKeepAliveCount define the details of connection monitoring, to help keeping track that the connection is still alive to both directions. You can use PublishingEnabled to take the subscription in or out of monitoring for custom periods.
You can also define a Priority for each subscription, to give the server a hint about the relative importance of different subscriptions. Higher values mean higher priority.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
modified |
items, lifetimeCount, maxKeepAliveCount, maxNotificationsPerPublish, priority, publishingEnabled, publishingInterval, updateCount| Constructor and Description |
|---|
Subscription()
Create a new subscription using the default values.
|
Subscription(Boolean publishingEnabled,
Double requestedPublishingInterval,
long requestedLifetimeCount,
long requestedMaxKeepAliveCount,
long maxNotificationsPerPublish,
int priority) |
Subscription(UnsignedInteger maxNotificationsPerPublish,
UnsignedInteger requestedLifetimeCount,
UnsignedInteger requestedMaxKeepAliveCount,
Double requestedPublishingInterval,
Boolean publishingEnabled,
UnsignedByte priority) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAliveListener(SubscriptionAliveListener subscriptionAliveListener)
Add a listener for the subscription alive and timeout events.
|
MonitoredItemCreateResult |
addItem(MonitoredItem item)
Adds a monitored item to the subscription.
|
MonitoredItemCreateResult[] |
addItems(MonitoredItem... items)
Adds several monitored items to the subscription at once.
|
void |
addNotificationListener(SubscriptionNotificationListener notificationListener)
Add a listener for the Notification notification event.
|
protected void |
applyUpdates()
Apply the pending modifications guarded by beginUpdate/endUpdate.
|
protected void |
checkOperationResult(StatusCode statusCode) |
protected void |
checkServiceResult(ServiceResponse response,
DiagnosticInfo[] operationDiagnostics) |
protected void |
checkTimeout() |
void |
conditionRefresh()
Calls ConditionRefresh Method using the Id of the calling Subscription as its parameter.
|
protected void |
createItems() |
protected CreateMonitoredItemsResponse |
createMonitoredItems(MonitoredItemBase... items) |
protected DeleteMonitoredItemsResponse |
deleteMonitoredItems(MonitoredItemBase... items) |
protected void |
enabledChanged()
Handles a change in PublishingEnabled
|
protected void |
fireAfterCreate() |
protected void |
fireAlive()
Fire the Alive event.
|
protected void |
fireBufferOverflow(UnsignedInteger sequenceNumber,
Structure[] notificationData) |
protected void |
fireDataChange(MonitoredDataItem item,
DataValue newValue) |
protected void |
fireError(Object notification,
Exception exception) |
protected void |
fireEvent(MonitoredEventItem item,
Variant[] values) |
protected void |
fireLifetimeTimeout()
Fire the Lifetime ended event.
|
protected long |
fireMissingData(UnsignedInteger lastSequenceNumber2,
long sequenceNumber,
long newSequenceNumber,
StatusCode serviceResult) |
protected void |
fireNotification(NotificationData notification)
Fire the Notification event.
|
protected void |
fireStatusChange(StatusCode oldStatus,
StatusCode newStatus,
DiagnosticInfo diagnosticInfo) |
protected void |
fireTimeout()
Fire the Timeout event.
|
double |
getAliveDetectionFactor() |
SubscriptionAliveListener[] |
getAliveListeners() |
UnsignedInteger[] |
getAvailableSequenceNumbers() |
protected List<UnsignedInteger> |
getAvailableSequenceNumbersList() |
UaClient |
getClient() |
DiagnosticInfo |
getDiagnosticInfo() |
MonitoredItem |
getItem(NodeId nodeId,
UnsignedInteger attributeId)
Find the item that is listening to the specified node attribute.
|
Instant |
getLastAlive()
Returns the timestamp of the last notification message from the server.
|
DiagnosticInfo[] |
getLastOperationDiagnostics()
The operation level diagnostic information related to the last service call.
|
UnsignedInteger |
getLastSequenceNumber() |
DiagnosticInfo |
getLastServiceDiagnostics()
The service level diagnostic information related to the last service call.
|
StatusCode |
getLastServiceResult()
The latest service result received for the service calls used to control the subscription.
|
int |
getMaxMonitoredItemsPerCall() |
protected MonitoringParameters |
getMonitoringParameters(MonitoredItemBase item) |
int |
getNotificationBufferSize()
The maximum size of the internal buffer used for incoming data packets.
|
SubscriptionNotificationListener[] |
getNotificationListeners() |
StatusCode |
getStatus()
The status received from the latest StatusChange notification.
|
double |
getTimeoutDetectionFactor() |
TimestampsToReturn |
getTimestampsToReturn() |
protected void |
handleNotificationDatas()
Handles all pending notifications from the responseQueue, where they have been recorded by
onPublishResponse(PublishResponse) |
boolean |
hasAliveListener(SubscriptionAliveListener subscriptionAliveListener)
Check if the subscription already has the specified alive listener.
|
boolean |
hasNotificationListener(SubscriptionNotificationListener notificationListener)
Check if the subscription already has the specified notification listener.
|
protected boolean |
hasPublishResponses() |
boolean |
isAlive()
Check whether the subscription is still alive or not.
|
protected boolean |
isAliveNotification(Structure[] notificationData) |
boolean |
isConnected()
Is the subscription connected to the server.
|
boolean |
isModified() |
boolean |
isRecreateFailedItems()
Check whether or not the Subscription will periodically attempt to recreate MonitoredItems that
received Bad_NodeIdUnknown as error code when creating the items was attempted previously.
|
boolean |
isRetransmissionEnabled()
Whether the Subscription is enabled to call Republish to the server.
|
boolean |
isTimeout()
Check whether the subscription timeout has occurred.
|
protected void |
itemChanged(MonitoredItem item) |
String |
itemsToString()
Convert the monitored items to a string for output purposes
|
protected ModifyMonitoredItemsResponse |
modifyMonitoredItems(List<MonitoredItem> items) |
protected void |
monitoringModeChanged(MonitoredItem monitoredItem) |
protected void |
onPublishResponse(PublishResponse response)
Records the new notification to the responseQueue to be handled later at
#handleNotificationData in another thread.
|
protected void |
paramChanged()
Parameter change "event".
|
DataValue[] |
readAll(Double maxAge,
TimestampsToReturn timestamps)
Read the current value of each MonitoredDataItem in the subscription.
|
protected void |
recreateMonitoredItems()
Attempts to recreate MonitoredItems with error code Bad_NodeIdUnknown.
|
void |
removeAliveListener(SubscriptionAliveListener subscriptionAliveListener)
Remove a listener for the subscription alive event.
|
MonitoredItemBase |
removeItem(MonitoredItemBase item)
Remove a monitored item from the subscription.
|
MonitoredItemBase |
removeItem(UnsignedInteger clientHandle)
Remove a monitored item from the subscription.
|
StatusCode[] |
removeItems()
Removes all monitored items from the subscription at once.
|
StatusCode[] |
removeItems(MonitoredItemBase... items)
Removes several monitored items from the subscription at once.
|
void |
removeNotificationListener(SubscriptionNotificationListener listener)
Remove a listener from the Notification event.
|
void |
republishAllAvailable() |
void |
resendData()
Calls ResendData Method using the Id of the calling Subscription as its parameter.
|
protected void |
reset()
Reset the subscription to a "removed" state.
|
protected boolean |
serverConnected() |
protected void |
setAlive(boolean isAlive)
Set status lifetime ended or not.
|
void |
setAliveDetectionFactor(double aliveDetectionFactor)
Set factor, which is used to predict when the subscription is at the end of it's lifetime.
|
protected void |
setClient(UaClient server) |
void |
setMaxMonitoredItemsPerCall(int maxMonitoredItemsPerCall)
Define the maximum number of items in one service call: this may reflect the respective
OperationLimit (default) of the server or you can define a sensible limit to avoid too big
requests, for example when the client is reconnecting.
|
void |
setMonitoringMode(MonitoringMode monitoringMode)
Set the monitoring mode of all items in the subscription.
|
protected SetMonitoringModeResponse |
setMonitoringMode(MonitoringMode monitoringMode,
List<MonitoredItem> items)
Set the monitoring mode of the specified items.
|
void |
setNotificationBufferSize(int maxNotificationDataQueueSize)
Define the maximum number of NotificationData packets to keep in the internal buffer.
|
void |
setPublishingInterval(long requestedPublishingInterval,
TimeUnit unit)
This interval defines the cyclic rate that the Subscription is being requested to return
Notifications to the Client.
|
void |
setRecreateFailedItems(boolean recreateFailedItems)
Define whether or not the Subscription will periodically attempt to recreate MonitoredItems
that received Bad_NodeIdUnknown as error code when creating the items was attempted previously.
|
void |
setRetransmissionEnabled(boolean republishEnabled)
Define whether the Subscription is enabled to call Republish to the server.
|
protected void |
setSubscriptionId(int i) |
protected void |
setSubscriptionId(UnsignedInteger id) |
protected void |
setTimeout(boolean value)
Set status timeout or not.
|
void |
setTimeoutDetectionFactor(double timeoutDetectionFactor)
Set factor, which is used to predict when the subscription has timed out.
|
void |
setTimestampsToReturn(TimestampsToReturn timestampsToReturn)
Define the timestamps to request from the server for the data change notifications.
|
void |
transferTo(UaClient newClient)
Move the subscription to another client connection.
|
void |
transferTo(UaClient newClient,
boolean sendInitialValues)
Move the subscription to another client connection.
|
void |
transferTo(UaClient newClient,
UnsignedInteger subscriptionId)
Move the subscription to another client connection, using the provided SubscriptionId.
|
protected void |
transferTo(UaClient newClient,
UnsignedInteger subscriptionId,
boolean sendInitialValues)
Internal.
|
void |
updateItems()
Update the locally modified monitored items in the server.
|
void |
updateMonitoringModes()
Update all pending monitoring mode changes to the server.
|
protected void |
updateSubscription() |
addItem, beginUpdate, compareTo, endUpdate, getItem, getItem, getItemCount, getItems, getLifetimeCount, getMaxKeepAliveCount, getMaxNotificationsPerPublish, getPriority, getPublishingInterval, getSubscriptionId, getUserData, hasItem, hasItem, hasItem, isPublishingEnabled, setLifetimeCount, setLifetimeCount, setMaxKeepAliveCount, setMaxKeepAliveCount, setMaxNotificationsPerPublish, setMaxNotificationsPerPublish, setPriority, setPriority, setPublishingEnabled, setPublishingInterval, setUserData, toStringpublic Subscription()
public Subscription(Boolean publishingEnabled, Double requestedPublishingInterval, long requestedLifetimeCount, long requestedMaxKeepAliveCount, long maxNotificationsPerPublish, int priority)
public Subscription(UnsignedInteger maxNotificationsPerPublish, UnsignedInteger requestedLifetimeCount, UnsignedInteger requestedMaxKeepAliveCount, Double requestedPublishingInterval, Boolean publishingEnabled, UnsignedByte priority)
maxNotificationsPerPublish - requestedLifetimeCount - requestedMaxKeepAliveCount - requestedPublishingInterval - publishingEnabled - priority - public void addAliveListener(SubscriptionAliveListener subscriptionAliveListener)
hasAliveListener(SubscriptionAliveListener), the listener is not added again.subscriptionAliveListener - SubscriptionAliveListenerpublic MonitoredItemCreateResult addItem(MonitoredItem item) throws ServiceException, StatusException
MonitoredItem.getErrorCode() will be set accordingly and an exception is
raised from here. You can use removeItem(MonitoredItemBase) to remove it.item - ServiceException - if the service call fails.StatusException - if the server returns an error for the item.MonitoredItem.getErrorCode()public MonitoredItemCreateResult[] addItems(MonitoredItem... items) throws ServiceException
MonitoredItem.getErrorCode() will be set accordingly
for each item.items - the new item definitionsServiceException - if the service call fails.MonitoredItem.getErrorCode()public void addNotificationListener(SubscriptionNotificationListener notificationListener)
hasNotificationListener(SubscriptionNotificationListener), the listener is not added
again.notificationListener - SubscriptionNotificationListenerpublic void conditionRefresh()
throws MethodCallStatusException,
ServiceException
public double getAliveDetectionFactor()
public SubscriptionAliveListener[] getAliveListeners()
public UnsignedInteger[] getAvailableSequenceNumbers()
public UaClient getClient()
public DiagnosticInfo getDiagnosticInfo()
getStatus()public MonitoredItem getItem(NodeId nodeId, UnsignedInteger attributeId)
SubscriptionBasegetItem in class SubscriptionBasenodeId - the listened nodeattributeId - the attributepublic Instant getLastAlive()
public DiagnosticInfo[] getLastOperationDiagnostics()
Use setOperationDiagnosticMask to define which operation level diagnostic information you wish to receive with the service calls. If you suspect that the results contain diagnostics, check this array after the service call.
Note that if you perform parallel service calls, they must be synchronized so that you get the lastOperationDiagnostics for the previous call. Or use alternative calls, such as 'read', which return the diagnostics as part of the service result.
getLastServiceDiagnostics()public UnsignedInteger getLastSequenceNumber()
public DiagnosticInfo getLastServiceDiagnostics()
Note that if you perform parallel service calls, they must be synchronized so that you get the lastServiceDiagnostics for the previous call. Or use alternative calls, such as 'read', which return the diagnostics as part of the service result.
If a service fails due to a bad ServiceResult, you can read the diagnostics to check if the server provide is additional information about the problem.
getLastOperationDiagnostics(),
getLastServiceResult()public StatusCode getLastServiceResult()
getLastServiceDiagnostics()public int getMaxMonitoredItemsPerCall()
setMaxMonitoredItemsPerCall(int)public int getNotificationBufferSize()
setNotificationBufferSize(int)public SubscriptionNotificationListener[] getNotificationListeners()
public StatusCode getStatus()
getDiagnosticInfo()public double getTimeoutDetectionFactor()
public TimestampsToReturn getTimestampsToReturn()
setTimestampsToReturn(TimestampsToReturn)public boolean hasAliveListener(SubscriptionAliveListener subscriptionAliveListener)
subscriptionAliveListener - the listener to checkpublic boolean hasNotificationListener(SubscriptionNotificationListener notificationListener)
notificationListener - the listener to checkpublic boolean isAlive()
SubscriptionBase.getLifetimeCount().SubscriptionBase.getLifetimeCount(),
SubscriptionAliveListener.onLifetimeTimeout(Subscription)public boolean isConnected()
When the subscription is added to the server, it gets a SubscriptionId. When the subscription is removed from the server the subscriptionId is set to null. This method simply checks that the subscriptionId is assigned and is non-zero.
If the client loses a connection to the server, the subscriptions will stay connected. If a the client connection is reopened, and a new session is created, the client will try to transfer the subscriptions that are already connected, to the new session.
public boolean isModified()
public boolean isRecreateFailedItems()
The timing of recreating MonitoredItems is controlled by the Server status check cycle of the
UaClient this Subscription belongs to. Disabling the Server status check for that
UaClient by setting the interval to zero with UaClient.setStatusCheckInterval(long)
also disables recreating MonitoredItems.
public boolean isRetransmissionEnabled()
This enables in effect the retransmission of missing notifications, in case the subscription notices such a case.
The notifications are tracked with sequenceNumbers, which enable the client to re-request the notifications that it find missing.
public boolean isTimeout()
SubscriptionBase.getMaxKeepAliveCount()public String itemsToString()
public DataValue[] readAll(Double maxAge, TimestampsToReturn timestamps) throws ServiceException
Makes a UaClient#read() call to the server with the NodeIds for every MonitoredDataItem
as provided by SubscriptionBase.getItems().
This is a convenience method to provide a quick way to refresh the current values of the items
in a subscription. This may be necessary if data is missed for the subscription during a
communication problem, i.e.
SubscriptionNotificationListener#onMissingData(UnsignedInteger, long, long, StatusCode)
has been called.
Note that the server should provide the initial value for every item when the items are created in the server, so you should not need to use 'read' to get the values then.
maxAge - The maximum age of the value that is accepted. See
UaClient.read(Double, TimestampsToReturn, ReadValueId...) for detailstimestamps - Which timestamps to returnSubscriptionBase.getItems(). Only MonitoredDataItems are regarded. If there are
MonitoredEventItems, the respective DataValue in the array is a null value with
expected StatusCode Bad_NodeIdInvalidServiceException - If the read() service call to the server failspublic void removeAliveListener(SubscriptionAliveListener subscriptionAliveListener)
subscriptionAliveListener - SubscriptionAliveListenerpublic MonitoredItemBase removeItem(MonitoredItemBase item) throws ServiceException, StatusException
removeItem in class SubscriptionBaseitem - The monitored item to remove.ServiceException - if the service call to delete the item from the server fails.StatusException - if the delete response from the server is badremoveItem(UnsignedInteger),
removeItems(),
removeItems(MonitoredItemBase...)public MonitoredItemBase removeItem(UnsignedInteger clientHandle) throws ServiceException, StatusException
removeItem in class SubscriptionBaseclientHandle - The clientHandle of the monitored item to remove.ServiceException - if the service call to delete the item from the server fails.StatusException - if the delete response from the server is badremoveItem(MonitoredItemBase),
removeItems(),
removeItems(MonitoredItemBase...)public StatusCode[] removeItems() throws ServiceException
Calls removeItems(MonitoredItemBase...) with null.
items - Monitored items. If null, all items in the subscription are removed.ServiceException - if the service call fails.removeItem(MonitoredItemBase),
removeItem(UnsignedInteger),
removeItems(MonitoredItemBase...)public StatusCode[] removeItems(MonitoredItemBase... items) throws ServiceException
items - Monitored items. If null, all items in the subscription are removed.ServiceException - if the service call fails.removeItem(MonitoredItemBase),
removeItem(UnsignedInteger),
removeItems()public void removeNotificationListener(SubscriptionNotificationListener listener)
listener - the listener to removeSubscriptionNotificationListenerpublic void republishAllAvailable()
throws ServiceException
ServiceExceptionpublic void resendData()
throws MethodCallStatusException,
ServiceException
public void setAliveDetectionFactor(double aliveDetectionFactor)
SubscriptionBase.getLifetimeCount() and SubscriptionBase.getPublishingInterval()aliveDetectionFactor - the aliveDetectionFactor to set (default 1.1), must be greater than
1IllegalArgumentException - if aliveDetectionFactor is <= 1public void setMaxMonitoredItemsPerCall(int maxMonitoredItemsPerCall)
maxMonitoredItemsPerCall - the maxMonitoredItemsPerCall to set. Use 0 to use no limit. Use
-1 to use what UaClient.getActualOperationLimits() defines (this is the
default).public void setMonitoringMode(MonitoringMode monitoringMode) throws ServiceException
Calls #setMonitoringMode(MonitoringMode, MonitoredItemBase...) with 'null' items.
monitoringMode - the mode to set to the itemsServiceException - if the service call to the server failspublic void setNotificationBufferSize(int maxNotificationDataQueueSize)
Default: 100
maxNotificationDataQueueSize - the maxNotificationDataQueueSize to setpublic void setPublishingInterval(long requestedPublishingInterval,
TimeUnit unit)
throws ServiceException
The negotiated value for this parameter returned in the response is used as the default sample interval for MonitoredItems assigned to this Subscription.
The value 0 is invalid.
Converts the requestedPublishingInterval to milliseconds and calls
SubscriptionBase.setPublishingInterval(double).
setPublishingInterval in class SubscriptionBaserequestedPublishingInterval - requested value for the publishing intervalunit - the time unit of the requestedPublishingInterval argumentServiceException - If the parameter could not be changed.SubscriptionBase.setPublishingInterval(double)public void setRecreateFailedItems(boolean recreateFailedItems)
The timing of recreating MonitoredItems is controlled by the Server status check cycle of the
UaClient this Subscription belongs to. Disabling the Server status check for that
UaClient by setting the interval to zero with UaClient.setStatusCheckInterval(long)
also disables recreating MonitoredItems.
public void setRetransmissionEnabled(boolean republishEnabled)
This enables in effect the retransmission of missing notifications, in case the subscription notices such a case.
The notifications are tracked with sequenceNumbers, which enable the client to re-request the notifications that it find missing. * Default: true
retransmissionEnabled - the retransmissionEnabled to setpublic void setTimeoutDetectionFactor(double timeoutDetectionFactor)
SubscriptionBase.getMaxKeepAliveCount() and SubscriptionBase.getPublishingInterval()timeoutDetectionFactor - the timeoutDetectionFactor to set (default 1.3), must be greater
than 1IllegalArgumentException - if timeoutDetectionFactor is <= 1public void setTimestampsToReturn(TimestampsToReturn timestampsToReturn)
timestampsToReturn - public void transferTo(UaClient newClient) throws ServiceException, StatusException
newClient - The new client. If the subscription was defined on another client, it will be
moved to the new client session.StatusException - If the transfer to a new client did not succeed.ServiceException - If the service calls failed.public void transferTo(UaClient newClient, boolean sendInitialValues) throws ServiceException, StatusException
newClient - The new client. If the subscription was defined on another client, it will be
moved to the new client session.sendInitialValues - if the server should resend the current values of the monitored itemsStatusException - If the transfer to a new client did not succeed.ServiceException - If the service calls failed.public void transferTo(UaClient newClient, UnsignedInteger subscriptionId) throws ServiceException, StatusException
newClient - The new client. If the subscription was defined on another client, it will be
moved to the new client session.subscriptionId - The SubscriptionId of the subscription to move. This enables moving the
subscription from another application by communicating the SubscriptionId between them.
If the subscription is created in this application, you can use
transferTo(UaClient) to move it to a new UaClient instance.StatusException - If the transfer to a new client did not succeed.ServiceException - If the service calls failed.public void updateItems()
throws ServiceException
Goes through all Items and checks every one that is marked with
MonitoredItem.isModified(). Those are included in a service call to the server for
modifymonitoredItems.
The method is automatically called whenever you modify an item or several, inside a
SubscriptionBase.beginUpdate()/SubscriptionBase.endUpdate() loop.
In case endUpdate fails, you can retry to update the pending changes by calling the modifyItems later.
ServiceException - if the service call to the server fails. You may need to retry again,
depending on the actual error.public void updateMonitoringModes()
throws ServiceException
ServiceExceptionprotected void applyUpdates()
throws ServiceException
SubscriptionBaseapplyUpdates in class SubscriptionBaseServiceExceptionprotected void checkOperationResult(StatusCode statusCode) throws StatusException
dataValue - StatusExceptionprotected void checkServiceResult(ServiceResponse response, DiagnosticInfo[] operationDiagnostics) throws ServiceException
response - The service response to check.operationDiagnostics - ServiceException - If the server returns a bad ServiceResult code for the service call.protected void checkTimeout()
protected void createItems()
throws ServiceException
ServiceExceptionprotected CreateMonitoredItemsResponse createMonitoredItems(MonitoredItemBase... items) throws ServiceException
ServiceExceptionprotected DeleteMonitoredItemsResponse deleteMonitoredItems(MonitoredItemBase... items) throws ServiceException
item - ServiceExceptionprotected void enabledChanged()
throws ServiceException,
StatusException
SubscriptionBaseenabledChanged in class SubscriptionBaseServiceExceptionStatusExceptionprotected void fireAfterCreate()
protected void fireAlive()
protected void fireBufferOverflow(UnsignedInteger sequenceNumber, Structure[] notificationData)
sequenceNumber - notificationData - protected void fireDataChange(MonitoredDataItem item, DataValue newValue)
item - newValue - protected void fireError(Object notification, Exception exception)
dataChangeNotification - e - protected void fireEvent(MonitoredEventItem item, Variant[] values)
item - values - protected void fireLifetimeTimeout()
protected long fireMissingData(UnsignedInteger lastSequenceNumber2, long sequenceNumber, long newSequenceNumber, StatusCode serviceResult)
lastSequenceNumber2 - sequenceNumber - newSequenceNumber - serviceResult - protected void fireNotification(NotificationData notification)
notification - protected void fireStatusChange(StatusCode oldStatus, StatusCode newStatus, DiagnosticInfo diagnosticInfo)
oldStatus - newStatus - diagnosticInfo - protected void fireTimeout()
protected List<UnsignedInteger> getAvailableSequenceNumbersList()
protected MonitoringParameters getMonitoringParameters(MonitoredItemBase item)
item - ServiceExceptionprotected void handleNotificationDatas()
throws ServerConnectionException,
ServiceException
onPublishResponse(PublishResponse)protected boolean hasPublishResponses()
protected boolean isAliveNotification(Structure[] notificationData)
notificationData - protected void itemChanged(MonitoredItem item) throws ServiceException
ServiceExceptionprotected ModifyMonitoredItemsResponse modifyMonitoredItems(List<MonitoredItem> items) throws ServiceException
subscription - item - ServiceExceptionprotected void monitoringModeChanged(MonitoredItem monitoredItem) throws ServiceException
monitoredItem - ServiceExceptionprotected void onPublishResponse(PublishResponse response)
response - protected void paramChanged()
throws ServiceException
SubscriptionBaseparamChanged in class SubscriptionBaseServiceExceptionprotected void recreateMonitoredItems()
UaClient.protected void reset()
protected boolean serverConnected()
protected void setAlive(boolean isAlive)
Subscription is alive, false means
lifetime has ended. NOTE! this method should only be called within checkTimeout().protected void setClient(UaClient server)
protected SetMonitoringModeResponse setMonitoringMode(MonitoringMode monitoringMode, List<MonitoredItem> items) throws ServiceException
monitoringMode - the mode to set to the itemsitems - the items to change. If null, all items in the subscription are changed (equals to
using setMonitoringMode(MonitoringMode))ServiceException - if the service call to the server failsprotected void setSubscriptionId(int i)
i - protected void setSubscriptionId(UnsignedInteger id)
setSubscriptionId in class SubscriptionBaseprotected void setTimeout(boolean value)
Subscription is timeout mode. NOTE! this method
should only be called within checkTimeout().protected void transferTo(UaClient newClient, UnsignedInteger subscriptionId, boolean sendInitialValues) throws ServiceException, StatusException
ServiceExceptionStatusExceptionprotected void updateSubscription()
throws ServiceException
ServiceExceptionCopyright © 2026. All rights reserved.