Class OpcuaSubscriptionHandle
java.lang.Object
org.apache.plc4x.java.spi.model.DefaultPlcSubscriptionHandle
org.apache.plc4x.java.opcua.protocol.OpcuaSubscriptionHandle
- All Implemented Interfaces:
PlcSubscriptionHandle
-
Constructor Summary
ConstructorsConstructorDescriptionOpcuaSubscriptionHandle(ConversationContext<OpcuaAPU> context, OpcuaProtocolLogic plcSubscriber, SecureChannel channel, PlcSubscriptionRequest subscriptionRequest, Long subscriptionId, long cycleTime) -
Method Summary
Modifier and TypeMethodDescriptionregister(Consumer<PlcSubscriptionEvent> consumer) Registers a new Consumer, this allows multiple PLC4X consumers to use the same subscription.voidMain subscriber loop.voidStop the subscriber either on disconnect or on errorMethods inherited from class org.apache.plc4x.java.spi.model.DefaultPlcSubscriptionHandle
equals, hashCode, toString
-
Constructor Details
-
OpcuaSubscriptionHandle
public OpcuaSubscriptionHandle(ConversationContext<OpcuaAPU> context, OpcuaProtocolLogic plcSubscriber, SecureChannel channel, PlcSubscriptionRequest subscriptionRequest, Long subscriptionId, long cycleTime)
-
-
Method Details
-
startSubscriber
public void startSubscriber()Main subscriber loop. For subscription we still need to send a request the server on every cycle. Which includes a request for an update of the previsouly agreed upon list of tags. The server will respond at most once every cycle. -
stopSubscriber
public void stopSubscriber()Stop the subscriber either on disconnect or on error -
register
Registers a new Consumer, this allows multiple PLC4X consumers to use the same subscription.- Specified by:
registerin interfacePlcSubscriptionHandle- Overrides:
registerin classDefaultPlcSubscriptionHandle- Parameters:
consumer- - Consumer to be used to send any returned values.- Returns:
- PlcConsumerRegistration - return the important information back to the client.
-