|
||||||||||
| 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.tcp.nio.AbstractServerConnection
public abstract class AbstractServerConnection
Abstract AbstractServerConnection class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.opcfoundation.ua.transport.ServerConnection |
|---|
ServerConnection.SecureChannelListener |
| Constructor Summary | |
|---|---|
protected |
AbstractServerConnection()
Constructor for AbstractServerConnection. |
| Method Summary | |
|---|---|
void |
addChannelListener(Channel.ChannelListener listener)
addChannelListener. |
void |
addConnectionListener(IConnectionListener listener)
Add response listener |
void |
addSecureChannelListener(ServerConnection.SecureChannelListener l)
addSecureChannelListener. |
CloseableObject |
close()
close. |
protected void |
fireSecureChannelAttached(ServerSecureChannel c)
Send a notification to listeners that a secure channel has been attached to (opened in) the connection. |
protected void |
fireSecureChannelDetached(ServerSecureChannel c)
Send a notification the listeners that a secure channel has been detached from the connection. |
String |
getConnectURL()
getConnectURL. |
Certificate |
getRemoteCertificate()
getRemoteCertificate. |
protected abstract CertificateValidator |
getRemoteCertificateValidator()
Remote Certificate Validator, invoked upon connect |
void |
getSecureChannels(Collection<ServerSecureChannel> list)
Get all open and opening secure channels of this connection. |
protected void |
onListenerException(RuntimeException rte)
Override this. |
protected void |
onStateTransition(CloseableObjectState oldState,
CloseableObjectState newState)
Override this. |
void |
removeChannelListener(Channel.ChannelListener listener)
removeChannelListener. |
void |
removeConnectionListener(IConnectionListener listener)
Add response listener |
void |
removeSecureChannelListener(ServerConnection.SecureChannelListener l)
removeSecureChannelListener. |
protected abstract int |
sendAsymmSecureMessage(AsyncWrite msg,
SecurityConfiguration securityConfiguration,
int secureChannelId,
int requestNumber,
AtomicInteger sendSequenceNumber)
sendAsymmSecureMessage. |
protected abstract void |
sendSecureMessage(AsyncWrite msg,
SecurityToken token,
int requestId,
int messageType,
AtomicInteger sendSequenceNumber)
sendSecureMessage. |
protected void |
setError(ServiceResultException e)
setError. |
protected void |
setError(StatusCode sc)
setError. |
protected void |
setError(UnsignedInteger errorCode)
setError. |
String |
toString()
|
| Methods inherited from class org.opcfoundation.ua.utils.AbstractState |
|---|
addStateListener, addStateNotifiable, assertNoError, attemptSetState, clearError, getError, getState, hasError, isStateTransitionAllowed, 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.ServerConnection |
|---|
getLocalAddress, getRemoteAddress |
| Methods inherited from interface org.opcfoundation.ua.utils.IStatefulObject |
|---|
addStateListener, addStateNotifiable, getError, getState, removeStateListener, removeStateNotifiable, waitForState, waitForState, waitForStateUninterruptibly |
| Constructor Detail |
|---|
protected AbstractServerConnection()
Constructor for AbstractServerConnection.
| Method Detail |
|---|
protected abstract CertificateValidator getRemoteCertificateValidator()
CertificateValidator object.
protected abstract int sendAsymmSecureMessage(AsyncWrite msg,
SecurityConfiguration securityConfiguration,
int secureChannelId,
int requestNumber,
AtomicInteger sendSequenceNumber)
throws ServiceResultException
sendAsymmSecureMessage.
msg - a AsyncWrite object.securityConfiguration - a SecurityConfiguration object.secureChannelId - a int.requestNumber - a int.sendSequenceNumber - a AtomicInteger object.
ServiceResultException - if any.
protected abstract void sendSecureMessage(AsyncWrite msg,
SecurityToken token,
int requestId,
int messageType,
AtomicInteger sendSequenceNumber)
sendSecureMessage.
msg - a AsyncWrite object.token - a SecurityToken object.requestId - a int.messageType - a int.sendSequenceNumber - a AtomicInteger object.protected void setError(UnsignedInteger errorCode)
setError.
errorCode - a UnsignedInteger object.protected void setError(StatusCode sc)
setError.
sc - a StatusCode object.protected void setError(ServiceResultException e)
setError.
setError in class AbstractState<CloseableObjectState,ServiceResultException>e - a ServiceResultException object.
protected void onStateTransition(CloseableObjectState oldState,
CloseableObjectState newState)
onStateTransition in class AbstractState<CloseableObjectState,ServiceResultException>oldState - a StateType object.newState - a StateType object.protected void onListenerException(RuntimeException rte)
onListenerException in class AbstractState<CloseableObjectState,ServiceResultException>rte - a RuntimeException object.public void getSecureChannels(Collection<ServerSecureChannel> list)
getSecureChannels in interface ServerConnectionlist - list to be filledpublic void addSecureChannelListener(ServerConnection.SecureChannelListener l)
addSecureChannelListener.
addSecureChannelListener in interface ServerConnectionl - a ServerConnection.SecureChannelListener object.public void removeSecureChannelListener(ServerConnection.SecureChannelListener l)
removeSecureChannelListener.
removeSecureChannelListener in interface ServerConnectionl - a ServerConnection.SecureChannelListener object.protected void fireSecureChannelAttached(ServerSecureChannel c)
c - a ServerSecureChannel object.protected void fireSecureChannelDetached(ServerSecureChannel c)
c - a ServerSecureChannel object.public String getConnectURL()
getConnectURL.
String object.public Certificate getRemoteCertificate()
getRemoteCertificate.
Certificate object.public void addChannelListener(Channel.ChannelListener listener)
addChannelListener.
listener - a Channel.ChannelListener object.public void removeChannelListener(Channel.ChannelListener listener)
removeChannelListener.
listener - a Channel.ChannelListener object.public void addConnectionListener(IConnectionListener listener)
addConnectionListener in interface ServerConnectionlistener - a IConnectionListener object.public void removeConnectionListener(IConnectionListener listener)
removeConnectionListener in interface ServerConnectionlistener - a IConnectionListener object.public String toString()
toString in class Objectpublic CloseableObject close()
close.
close in interface CloseableObjectCloseableObject object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||