public class ServiceChannel extends ChannelService implements SecureChannel
ChannelService.| Constructor and Description |
|---|
ServiceChannel(SecureChannel channel)
Constructor for ServiceChannel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the secure channel.
|
AsyncResult<SecureChannel> |
closeAsync()
Close the secure channel.
|
void |
dispose()
Close and dispose.
|
String |
getConnectURL()
Return the URL of the connection.
|
EndpointConfiguration |
getEndpointConfiguration()
getEndpointConfiguration.
|
EndpointDescription |
getEndpointDescription()
getEndpointDescription.
|
EncoderContext |
getMessageContext()
getMessageContext.
|
MessageSecurityMode |
getMessageSecurityMode()
Get message security mode.
|
int |
getOperationTimeout()
Get operation timeout
|
int |
getSecureChannelId()
Get secure channel ID
|
SecurityPolicy |
getSecurityPolicy()
Get security policy
|
void |
initialize(String url,
TransportChannelSettings settings,
EncoderContext ctx)
Initialize a secure channel with endpoint identified by the URL.
|
void |
initialize(TransportChannelSettings settings,
EncoderContext ctx)
Initialize a secure channel with endpoint identified by the URL.
|
boolean |
isOpen()
Is the secure channel open.
|
void |
open()
Open the secure channel with the endpoint identified by the URL.
|
AsyncResult<SecureChannel> |
openAsync()
Open the secure channel asynchronously.
|
<T extends ServiceResponse> |
serviceRequest(ServiceRequest<T> request)
Sends a request over the secure channel.
|
<T extends ServiceResponse> |
serviceRequestAsync(ServiceRequest<T> request)
Asynchronous operation to send a request over the secure channel.
|
void |
setOperationTimeout(int timeout)
Set operation timeout
|
ActivateSession, ActivateSession, ActivateSessionAsync, ActivateSessionAsync, AddNodes, AddNodes, AddNodesAsync, AddNodesAsync, AddReferences, AddReferences, AddReferencesAsync, AddReferencesAsync, Browse, Browse, BrowseAsync, BrowseAsync, BrowseNext, BrowseNext, BrowseNextAsync, BrowseNextAsync, Call, Call, CallAsync, CallAsync, Cancel, Cancel, CancelAsync, CancelAsync, CloseSecureChannel, CloseSecureChannel, CloseSecureChannelAsync, CloseSecureChannelAsync, CloseSession, CloseSession, CloseSessionAsync, CloseSessionAsync, CreateMonitoredItems, CreateMonitoredItems, CreateMonitoredItemsAsync, CreateMonitoredItemsAsync, CreateSession, CreateSession, CreateSessionAsync, CreateSessionAsync, CreateSubscription, CreateSubscription, CreateSubscriptionAsync, CreateSubscriptionAsync, DeleteMonitoredItems, DeleteMonitoredItems, DeleteMonitoredItemsAsync, DeleteMonitoredItemsAsync, DeleteNodes, DeleteNodes, DeleteNodesAsync, DeleteNodesAsync, DeleteReferences, DeleteReferences, DeleteReferencesAsync, DeleteReferencesAsync, DeleteSubscriptions, DeleteSubscriptions, DeleteSubscriptionsAsync, DeleteSubscriptionsAsync, FindServers, FindServers, FindServersAsync, FindServersAsync, FindServersOnNetwork, FindServersOnNetwork, FindServersOnNetworkAsync, FindServersOnNetworkAsync, GetEndpoints, GetEndpoints, GetEndpointsAsync, GetEndpointsAsync, HistoryRead, HistoryRead, HistoryReadAsync, HistoryReadAsync, HistoryUpdate, HistoryUpdate, HistoryUpdateAsync, HistoryUpdateAsync, ModifyMonitoredItems, ModifyMonitoredItems, ModifyMonitoredItemsAsync, ModifyMonitoredItemsAsync, ModifySubscription, ModifySubscription, ModifySubscriptionAsync, ModifySubscriptionAsync, OpenSecureChannel, OpenSecureChannel, OpenSecureChannelAsync, OpenSecureChannelAsync, Publish, Publish, PublishAsync, PublishAsync, QueryFirst, QueryFirst, QueryFirstAsync, QueryFirstAsync, QueryNext, QueryNext, QueryNextAsync, QueryNextAsync, Read, Read, ReadAsync, ReadAsync, RegisterNodes, RegisterNodes, RegisterNodesAsync, RegisterNodesAsync, RegisterServer, RegisterServer, RegisterServer2, RegisterServer2, RegisterServer2Async, RegisterServer2Async, RegisterServerAsync, RegisterServerAsync, Republish, Republish, RepublishAsync, RepublishAsync, SetMonitoringMode, SetMonitoringMode, SetMonitoringModeAsync, SetMonitoringModeAsync, SetPublishingMode, SetPublishingMode, SetPublishingModeAsync, SetPublishingModeAsync, setRequestChannel, SetTriggering, SetTriggering, SetTriggeringAsync, SetTriggeringAsync, TransferSubscriptions, TransferSubscriptions, TransferSubscriptionsAsync, TransferSubscriptionsAsync, TranslateBrowsePathsToNodeIds, TranslateBrowsePathsToNodeIds, TranslateBrowsePathsToNodeIdsAsync, TranslateBrowsePathsToNodeIdsAsync, UnregisterNodes, UnregisterNodes, UnregisterNodesAsync, UnregisterNodesAsync, Write, Write, WriteAsync, WriteAsyncpublic ServiceChannel(SecureChannel channel)
Constructor for ServiceChannel.
channel - a SecureChannel object.public void close()
This method sends CloseSecureChannelRequest to the server and closes the socket connection. If sending of the message fails and thus the servers never receives notification about closed secure channel, then there is no resend attempt. The secure channel will eventually time out in the server.
All pending requests will fault with Bad_SecureChannelClosed
close in interface SecureChannelpublic AsyncResult<SecureChannel> closeAsync()
This method sends CloseSecureChannelRequest to the server and closes the socket connection. If sending of the message fails and thus the servers never receives notification about closed secure channel, then there is no resend attempt. The secure channel will eventually time out in the server.
All pending requests will fault with Bad_SecureChannelClosed
closeAsync in interface SecureChannelpublic void dispose()
dispose in interface SecureChannelpublic String getConnectURL()
getConnectURL in interface SecureChannelpublic EndpointConfiguration getEndpointConfiguration()
getEndpointConfiguration.
getEndpointConfiguration in interface SecureChannelEndpointConfiguration object.public EndpointDescription getEndpointDescription()
getEndpointDescription.
getEndpointDescription in interface SecureChannelEndpointDescription object.public EncoderContext getMessageContext()
getMessageContext.
getMessageContext in interface SecureChannelEncoderContext object.public MessageSecurityMode getMessageSecurityMode()
getMessageSecurityMode in interface SecureChannelpublic int getOperationTimeout()
getOperationTimeout in interface SecureChannelpublic int getSecureChannelId()
getSecureChannelId in interface SecureChannelpublic SecurityPolicy getSecurityPolicy()
getSecurityPolicy in interface SecureChannelpublic void initialize(String url, TransportChannelSettings settings, EncoderContext ctx) throws ServiceResultException
initialize in interface SecureChannelurl - connect urlsettings - a TransportChannelSettings object.ctx - a EncoderContext object.ServiceResultException - if any.public void initialize(TransportChannelSettings settings, EncoderContext ctx) throws ServiceResultException
initialize in interface SecureChannelsettings - a TransportChannelSettings object.ctx - a EncoderContext object.ServiceResultException - if any.public boolean isOpen()
isOpen in interface SecureChannelpublic void open()
throws ServiceResultException
StatusCodes.Bad_Timeout.
open in interface SecureChannelServiceResultException - if any.public AsyncResult<SecureChannel> openAsync()
openAsync in interface SecureChannelpublic <T extends ServiceResponse> T serviceRequest(ServiceRequest<T> request) throws ServiceResultException
If the operation timeouts or the thread is interrupted a ServiceResultException is thrown with
StatusCodes.Bad_Timeout.
Sends a request over the secure channel.
If the operation timeouts or the thread is interrupted a ServiceResultException is thrown with
StatusCodes.Bad_Timeout.
serviceRequest in interface RequestChannelserviceRequest in interface SecureChannelT - type of the response (determined automatically from the request).request - the requestServiceResultException - if errorpublic <T extends ServiceResponse> AsyncResult<T> serviceRequestAsync(ServiceRequest<T> request)
serviceRequestAsync in interface RequestChannelserviceRequestAsync in interface SecureChannelT - type of the response (determined automatically from the request).request - the requestpublic void setOperationTimeout(int timeout)
setOperationTimeout in interface SecureChanneltimeout - in millisecondsCopyright © 2026. All rights reserved.