org.opcfoundation.ua.transport.tcp.io
Interface ITransportChannel

All Known Implementing Classes:
HttpsClient, SecureChannelTcp

public interface ITransportChannel

ITransportChannel interface.


Nested Class Summary
static class ITransportChannel.TransportChannelFeature
           
 
Method Summary
 void dispose()
          dispose.
 EndpointConfiguration getEndpointConfiguration()
          getEndpointConfiguration.
 EndpointDescription getEndpointDescription()
          getEndpointDescription.
 EncoderContext getMessageContext()
          getMessageContext.
 int getOperationTimeout()
          Get operation timeout
 EnumSet<ITransportChannel.TransportChannelFeature> getSupportedFeatures()
          Get a list of features supported by the channel.
 void initialize(String url, TransportChannelSettings settings, EncoderContext ctx)
          Initialize a secure channel with endpoint identified by the URL.
 ServiceResponse serviceRequest(ServiceRequest request)
          Send a service request over the secure channel.
 ServiceResponse serviceRequest(ServiceRequest request, long operationTimeout)
          Send a service request over the secure channel.
 AsyncResult<ServiceResponse> serviceRequestAsync(ServiceRequest request)
          Asynchronous operation to send a request over the secure channel.
 AsyncResult<ServiceResponse> serviceRequestAsync(ServiceRequest request, long operationTimeout)
          Asynchronous operation to send a request over the secure channel.
 void setOperationTimeout(int timeout)
          Set operation timeout
 

Method Detail

initialize

void initialize(String url,
                TransportChannelSettings settings,
                EncoderContext ctx)
                throws ServiceResultException
Initialize a secure channel with endpoint identified by the URL.

Parameters:
url - a String object.
settings - a TransportChannelSettings object.
ctx - a EncoderContext object.
Throws:
ServiceResultException - if any.

serviceRequest

ServiceResponse serviceRequest(ServiceRequest request)
                               throws ServiceResultException
Send a service request over the secure channel.

If the operation timeouts or the thread is interrupted a ServiceResultException is thrown with StatusCodes.Bad_Timeout.

Parameters:
request - a ServiceRequest object.
Returns:
a ServiceResponse object.
Throws:
ServiceResultException - if any.

serviceRequestAsync

AsyncResult<ServiceResponse> serviceRequestAsync(ServiceRequest request)
Asynchronous operation to send a request over the secure channel.

Parameters:
request - the request
Returns:
the result

serviceRequest

ServiceResponse serviceRequest(ServiceRequest request,
                               long operationTimeout)
                               throws ServiceResultException
Send a service request over the secure channel.

If the operation timeouts or the operation is interrupted and a ServiceResultException is thrown with StatusCodes.Bad_Timeout.

Parameters:
request - a ServiceRequest object.
operationTimeout - timeout time in milliseconds
Returns:
a ServiceResponse object.
Throws:
ServiceResultException - if any.

serviceRequestAsync

AsyncResult<ServiceResponse> serviceRequestAsync(ServiceRequest request,
                                                 long operationTimeout)
Asynchronous operation to send a request over the secure channel.

Parameters:
request - the request
operationTimeout - timeout time
Returns:
the result

getSupportedFeatures

EnumSet<ITransportChannel.TransportChannelFeature> getSupportedFeatures()
Get a list of features supported by the channel.

Returns:
a EnumSet object.

getEndpointDescription

EndpointDescription getEndpointDescription()

getEndpointDescription.

Returns:
a EndpointDescription object.

getEndpointConfiguration

EndpointConfiguration getEndpointConfiguration()

getEndpointConfiguration.

Returns:
a EndpointConfiguration object.

getMessageContext

EncoderContext getMessageContext()

getMessageContext.

Returns:
a EncoderContext object.

setOperationTimeout

void setOperationTimeout(int timeout)
Set operation timeout

Parameters:
timeout - in milliseconds

getOperationTimeout

int getOperationTimeout()
Get operation timeout

Returns:
timeout in milliseconds

dispose

void dispose()

dispose.



Copyright © 2018. All rights reserved.