Interface PlcSubscriptionRequest.Builder
-
- All Superinterfaces:
PlcRequestBuilder
- Enclosing interface:
- PlcSubscriptionRequest
public static interface PlcSubscriptionRequest.Builder extends PlcRequestBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PlcSubscriptionRequest.Builder
addChangeOfStateTag(String name, PlcTag tag)
Adds a new tag to the to be constructed request which should be updated as soon as a value changes in the PLC.PlcSubscriptionRequest.Builder
addChangeOfStateTagAddress(String name, String tagAddress)
Adds a new tag to the to be constructed request which should be updated as soon as a value changes in the PLC.PlcSubscriptionRequest.Builder
addCyclicTag(String name, PlcTag tag, Duration pollingInterval)
Adds a new tag to the to be constructed request which should be polled cyclically.PlcSubscriptionRequest.Builder
addCyclicTagAddress(String name, String tagAddress, Duration pollingInterval)
Adds a new tag to the to be constructed request which should be polled cyclically.PlcSubscriptionRequest.Builder
addEventTag(String name, PlcTag tag)
Adds a new subscription to the to be constructed request which should be updated as soon as an event occurs.PlcSubscriptionRequest.Builder
addEventTagAddress(String name, String tagAddress)
Adds a new subscription to the to be constructed request which should be updated as soon as an event occurs.PlcSubscriptionRequest.Builder
addPreRegisteredConsumer(String name, Consumer<PlcSubscriptionEvent> preRegisteredConsumer)
Convenience method which attaches theConsumer
directly to the handles once the requests succeeds.PlcSubscriptionRequest
build()
-
-
-
Method Detail
-
build
PlcSubscriptionRequest build()
- Specified by:
build
in interfacePlcRequestBuilder
-
addCyclicTagAddress
PlcSubscriptionRequest.Builder addCyclicTagAddress(String name, String tagAddress, Duration pollingInterval)
Adds a new tag to the to be constructed request which should be polled cyclically.- Parameters:
name
- alias of the tag.tagAddress
- tag address string for accessing the tag.pollingInterval
- interval, in which the tag should be polled.- Returns:
- builder.
-
addCyclicTag
PlcSubscriptionRequest.Builder addCyclicTag(String name, PlcTag tag, Duration pollingInterval)
Adds a new tag to the to be constructed request which should be polled cyclically.- Parameters:
name
- alias of the tag.tag
- tag instance for accessing the tag.pollingInterval
- interval, in which the tag should be polled.- Returns:
- builder.
-
addChangeOfStateTagAddress
PlcSubscriptionRequest.Builder addChangeOfStateTagAddress(String name, String tagAddress)
Adds a new tag to the to be constructed request which should be updated as soon as a value changes in the PLC.- Parameters:
name
- alias of the tag.tagAddress
- tag address string for accessing the tag.- Returns:
- builder.
-
addChangeOfStateTag
PlcSubscriptionRequest.Builder addChangeOfStateTag(String name, PlcTag tag)
Adds a new tag to the to be constructed request which should be updated as soon as a value changes in the PLC.- Parameters:
name
- alias of the tag.tag
- tag instance for accessing the tag.- Returns:
- builder.
-
addEventTagAddress
PlcSubscriptionRequest.Builder addEventTagAddress(String name, String tagAddress)
Adds a new subscription to the to be constructed request which should be updated as soon as an event occurs.REMARK: We will have to see if this signature is correct as soon as we start using this type of subscription.
- Parameters:
name
- alias of the tag.tagAddress
- tag address string for accessing the tag.- Returns:
- builder.
-
addEventTag
PlcSubscriptionRequest.Builder addEventTag(String name, PlcTag tag)
Adds a new subscription to the to be constructed request which should be updated as soon as an event occurs.REMARK: We will have to see if this signature is correct as soon as we start using this type of subscription.
- Parameters:
name
- alias of the tag.tag
- tag instance for accessing the tag.- Returns:
- builder.
-
addPreRegisteredConsumer
PlcSubscriptionRequest.Builder addPreRegisteredConsumer(String name, Consumer<PlcSubscriptionEvent> preRegisteredConsumer)
Convenience method which attaches theConsumer
directly to the handles once the requests succeeds. Note: opposed to register on thePlcSubscriptionHandle
directly you won't retrieve aPlcConsumerRegistration
which is useful to cancel registrations.- Parameters:
name
- alias of the tag.preRegisteredConsumer
-Consumer
to be attached- Returns:
- builder.
-
-