Class SecureChannel
java.lang.Object
org.apache.plc4x.java.opcua.context.SecureChannel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Patternprotected static final ExtensionObjectprotected static final PascalStringstatic final Durationstatic final longstatic final Pattern -
Constructor Summary
ConstructorsConstructorDescriptionSecureChannel(DriverContext driverContext, OpcuaConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionReturns the authentication token for the current connectionintGets the Channel identifier for the current channelstatic longintReturns the next request handleintGets the Token IdentifiervoidonConnect(ConversationContext<OpcuaAPU> context) voidvoidonConnectOpenSecureChannel(ConversationContext<OpcuaAPU> context, OpcuaAcknowledgeResponse opcuaAcknowledgeResponse) voidonDisconnect(ConversationContext<OpcuaAPU> context) voidonDiscover(ConversationContext<OpcuaAPU> context) voidonDiscoverGetEndpointsRequest(ConversationContext<OpcuaAPU> context, OpcuaOpenResponse opcuaOpenResponse, OpenSecureChannelResponse openSecureChannelResponse) voidonDiscoverOpenSecureChannel(ConversationContext<OpcuaAPU> context, OpcuaAcknowledgeResponse opcuaAcknowledgeResponse) voidsubmit(ConversationContext<OpcuaAPU> context, Consumer<TimeoutException> onTimeout, BiConsumer<OpcuaAPU, Throwable> error, Consumer<byte[]> consumer, WriteBufferByteBased buffer)
-
Field Details
-
REQUEST_TIMEOUT
-
REQUEST_TIMEOUT_LONG
public static final long REQUEST_TIMEOUT_LONG- See Also:
-
NULL_STRING
-
NULL_EXTENSION_OBJECT
-
INET_ADDRESS_PATTERN
-
URI_PATTERN
-
-
Constructor Details
-
SecureChannel
-
-
Method Details
-
submit
public void submit(ConversationContext<OpcuaAPU> context, Consumer<TimeoutException> onTimeout, BiConsumer<OpcuaAPU, Throwable> error, Consumer<byte[]> consumer, WriteBufferByteBased buffer) -
onConnect
-
onConnectOpenSecureChannel
public void onConnectOpenSecureChannel(ConversationContext<OpcuaAPU> context, OpcuaAcknowledgeResponse opcuaAcknowledgeResponse) -
onConnectCreateSessionRequest
public void onConnectCreateSessionRequest(ConversationContext<OpcuaAPU> context) throws PlcConnectionException - Throws:
PlcConnectionException
-
onDisconnect
-
onDiscover
-
onDiscoverOpenSecureChannel
public void onDiscoverOpenSecureChannel(ConversationContext<OpcuaAPU> context, OpcuaAcknowledgeResponse opcuaAcknowledgeResponse) -
onDiscoverGetEndpointsRequest
public void onDiscoverGetEndpointsRequest(ConversationContext<OpcuaAPU> context, OpcuaOpenResponse opcuaOpenResponse, OpenSecureChannelResponse openSecureChannelResponse) throws PlcConnectionException - Throws:
PlcConnectionException
-
getRequestHandle
public int getRequestHandle()Returns the next request handle- Returns:
- the next sequential request handle
-
getAuthenticationToken
Returns the authentication token for the current connection- Returns:
- a NodeId Authentication token
-
getChannelId
public int getChannelId()Gets the Channel identifier for the current channel- Returns:
- int representing the channel identifier
-
getTokenId
public int getTokenId()Gets the Token Identifier- Returns:
- int representing the token identifier
-
getCurrentDateTime
public static long getCurrentDateTime()
-