|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.utils.AbstractState<CloseableObjectState,ServiceResultException>
org.opcfoundation.ua.transport.endpoint.AbstractServerSecureChannel
public abstract class AbstractServerSecureChannel
Super class for endpoint secure channels. Common mechanism: - Secure channel id - Security tokens - State and Error State
| Field Summary | |
|---|---|
protected SecurityToken |
activeToken
The active token, This token is used in write operations |
protected Map<Integer,SecurityToken> |
tokens
Collection of all Security Tokens |
| Constructor Summary | |
|---|---|
protected |
AbstractServerSecureChannel(int secureChannelId)
Constructor for AbstractServerSecureChannel. |
| Method Summary | |
|---|---|
void |
close()
Close the secure channel. |
AsyncResult<ServerSecureChannel> |
closeAsync()
Close the secure channel. |
SecurityToken |
getActiveSecurityToken()
getActiveSecurityToken. |
SecurityToken |
getLatestNonExpiredToken()
getLatestNonExpiredToken. |
MessageSecurityMode |
getMessageSecurityMode()
getMessageSecurityMode. |
protected String |
getRemoteAddress()
getRemoteAddress. |
int |
getSecureChannelId()
Getter for the field secureChannelId. |
SecurityPolicy |
getSecurityPolicy()
getSecurityPolicy. |
SecurityToken |
getSecurityToken(int tokenId)
getSecurityToken. |
boolean |
isOpen()
Is the secure channel open. |
protected void |
onListenerException(RuntimeException rte)
Override this. |
void |
setActiveSecurityToken(SecurityToken token)
setActiveSecurityToken. |
void |
setError(ServiceResultException e)
setError. |
String |
toString()
|
| Methods inherited from class org.opcfoundation.ua.utils.AbstractState |
|---|
addStateListener, addStateNotifiable, assertNoError, attemptSetState, clearError, getError, getState, hasError, isStateTransitionAllowed, onStateTransition, removeStateListener, removeStateNotifiable, setState, setState, waitForState, waitForState, waitForStateUninterruptibly |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.opcfoundation.ua.transport.ServerSecureChannel |
|---|
dispose, getConnection, getConnectURL, getEndpoint, getLocalCertificate, getPendingServiceRequests, getRemoteCertificate, getServer, needsCertificate |
| Field Detail |
|---|
protected Map<Integer,SecurityToken> tokens
protected SecurityToken activeToken
| Constructor Detail |
|---|
protected AbstractServerSecureChannel(int secureChannelId)
Constructor for AbstractServerSecureChannel.
secureChannelId - a int.| Method Detail |
|---|
public int getSecureChannelId()
Getter for the field secureChannelId.
getSecureChannelId in interface ServerSecureChannelpublic SecurityToken getActiveSecurityToken()
getActiveSecurityToken.
SecurityToken object.public void setActiveSecurityToken(SecurityToken token)
setActiveSecurityToken.
token - a SecurityToken object.public SecurityToken getSecurityToken(int tokenId)
getSecurityToken.
tokenId - a int.
SecurityToken object.public MessageSecurityMode getMessageSecurityMode()
getMessageSecurityMode.
getMessageSecurityMode in interface ServerSecureChannelMessageSecurityMode object.public SecurityPolicy getSecurityPolicy()
getSecurityPolicy.
getSecurityPolicy in interface ServerSecureChannelSecurityPolicy object.public SecurityToken getLatestNonExpiredToken()
getLatestNonExpiredToken.
SecurityToken object.public void setError(ServiceResultException e)
setError.
setError in class AbstractState<CloseableObjectState,ServiceResultException>e - a ServiceResultException object.protected void onListenerException(RuntimeException rte)
onListenerException in class AbstractState<CloseableObjectState,ServiceResultException>rte - a RuntimeException object.public String toString()
toString in class Objectprotected String getRemoteAddress()
getRemoteAddress.
String object.public boolean isOpen()
isOpen in interface ServerSecureChannelpublic 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, instead the secure channel will eventually time out in the server.
All pending requests will fault with Bad_SecureChannelClosed
close in interface ServerSecureChannelpublic AsyncResult<ServerSecureChannel> 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, instead the secure channel will eventually time out in the server.
All pending requests will fault with Bad_SecureChannelClosed
closeAsync in interface ServerSecureChannel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||