|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.transport.ChannelService
org.opcfoundation.ua.transport.ServiceChannel
public class ServiceChannel
This utility class envelopes Securechannel with client service methods.
See ChannelService.
| Constructor Summary | |
|---|---|
ServiceChannel(SecureChannel channel)
Constructor for ServiceChannel. |
|
| Method Summary | |
|---|---|
void |
close()
Close the secure channel. |
AsyncResult<SecureChannel> |
closeAsync()
Close the secure channel. |
void |
dispose()
Close and dispose. |
ServerConnection |
getConnection()
Get current socket connection if applicable for the binding type. |
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. |
ServiceResponse |
serviceRequest(ServiceRequest request)
Sends a request over the secure channel. |
AsyncResult<ServiceResponse> |
serviceRequestAsync(ServiceRequest request)
Asynchronous operation to send a request over the secure channel. |
void |
setOperationTimeout(int timeout)
Set operation timeout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceChannel(SecureChannel channel)
Constructor for ServiceChannel.
channel - a SecureChannel object.| Method Detail |
|---|
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 ServerConnection getConnection()
getConnection 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 SecureChannel
public 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 boolean isOpen()
isOpen in interface SecureChannel
public void open()
throws ServiceResultException
StatusCodes.Bad_Timeout.
open in interface SecureChannelServiceResultException - if any.public AsyncResult<SecureChannel> openAsync()
openAsync in interface SecureChannel
public ServiceResponse serviceRequest(ServiceRequest 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 SecureChannelrequest - the request
ServiceResultException - if errorpublic AsyncResult<ServiceResponse> serviceRequestAsync(ServiceRequest request)
serviceRequestAsync in interface RequestChannelserviceRequestAsync in interface SecureChannelrequest - the request
public void setOperationTimeout(int timeout)
setOperationTimeout in interface SecureChanneltimeout - in milliseconds
public void initialize(TransportChannelSettings settings,
EncoderContext ctx)
throws ServiceResultException
initialize in interface SecureChannelsettings - a TransportChannelSettings object.ctx - a EncoderContext object.
ServiceResultException - if any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||