|
||||||||||
| 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.application.SessionChannel
public class SessionChannel
Session channel is a request channel of an active session.
It is fully safe to use session channel from different thread simultaneosly.
Session channel adds authentication token and time stamp to all requests. TODO Keep-Alive
| Constructor Summary | |
|---|---|
SessionChannel(Client client,
Session session,
SecureChannel channel)
Constructor for SessionChannel. |
|
| Method Summary | |
|---|---|
ActivateSessionResponse |
activate()
Activate session using anonymous access. |
ActivateSessionResponse |
activate(byte[] issuedIdentityToken)
Activate session using identity token. |
ActivateSessionResponse |
activate(String username,
String password)
Activate session using user name and password. |
ActivateSessionResponse |
activate(UserIdentityToken identity,
SignatureData identitySignature)
Activate session. |
void |
close()
Close the session and the secure channel. |
AsyncResult<SecureChannel> |
closeAsync()
Close the session and the secure channel asynchronously. |
void |
closeSecureChannel()
Close the underlying secure channel. |
void |
closeUnsafe()
Close the session and the secure channel. |
void |
dispose()
dispose. |
SecureChannel |
getSecureChannel()
Get secure channel. |
Session |
getSession()
Get the session. |
IEncodeable |
serviceRequest(ServiceRequest serviceRequest)
Sends a request over the secure channel. |
AsyncResult<ServiceResponse> |
serviceRequestAsync(ServiceRequest request)
Asynchronous operation to send a request over the secure channel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionChannel(Client client,
Session session,
SecureChannel channel)
Constructor for SessionChannel.
client - a Client object.session - a Session object.channel - a SecureChannel object.| Method Detail |
|---|
public ActivateSessionResponse activate()
throws ServiceResultException
ServiceResultException - if error
public ActivateSessionResponse activate(String username,
String password)
throws ServiceResultException
username - user namepassword - user password
ServiceResultException - if error
public ActivateSessionResponse activate(byte[] issuedIdentityToken)
throws ServiceResultException
issuedIdentityToken - token
ServiceResultException - if error
public ActivateSessionResponse activate(UserIdentityToken identity,
SignatureData identitySignature)
throws ServiceResultException
identity - user identity, see EndpointUtil.createIssuedIdentityToken(EndpointDescription, byte[], byte[])identitySignature - used with X509IdentityToken and IssuedIdentityToken ?identitySignature - used with X509IdentityToken and IssuedIdentityToken ?
ServiceResultException - if errorpublic Session getSession()
public SecureChannel getSecureChannel()
public void close()
throws ServiceFaultException,
ServiceResultException
ChannelService.CloseSession(RequestHeader, Boolean) and closeSecureChannel().
ServiceResultException - if error
ServiceFaultException - if errorpublic void closeUnsafe()
close().
public void closeSecureChannel()
public AsyncResult<SecureChannel> closeAsync()
Use close() to close the session before
closing the session.
public void dispose()
dispose.
public IEncodeable serviceRequest(ServiceRequest serviceRequest)
throws ServiceResultException
If the operation timeouts or the thread is interrupted a
ServiceResultException is thrown with StatusCodes.Bad_Timeout.
Invoke session service request.
AuthenticationToken and Timestamp is added to RequestHeader.
If the operation timeouts or the thread is interrupted a ServiceResultException is thrown withStatusCodes.Bad_Timeout
serviceRequest in interface RequestChannelserviceRequest - the request
ServiceResultException - if errorpublic AsyncResult<ServiceResponse> serviceRequestAsync(ServiceRequest request)
AuthenticationToken and Timestamp is added to RequestHeader.
serviceRequestAsync in interface RequestChannelrequest - the request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||