public abstract class AbstractServerConnection extends AbstractState<CloseableObjectState,ServiceResultException> implements ServerConnection, CloseableObject
Abstract AbstractServerConnection class.
ServerConnection.SecureChannelListener| Modifier | Constructor and Description |
|---|---|
protected |
AbstractServerConnection()
Constructor for AbstractServerConnection.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
addStateListener, addStateNotifiable, attemptSetState, clearError, getError, getState, hasError, isStateTransitionAllowed, removeStateListener, removeStateNotifiable, setState, setState, throwIfError, waitForState, waitForState, waitForStateUninterruptiblyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLocalAddress, getRemoteAddressaddStateListener, addStateNotifiable, getError, getState, removeStateListener, removeStateNotifiable, waitForState, waitForState, waitForStateUninterruptiblyprotected AbstractServerConnection()
Constructor for AbstractServerConnection.
public void addChannelListener(Channel.ChannelListener listener)
addChannelListener.
listener - a Channel.ChannelListener
object.public void addConnectionListener(IConnectionListener listener)
addConnectionListener in interface ServerConnectionlistener - a IConnectionListener object.public void addSecureChannelListener(ServerConnection.SecureChannelListener l)
addSecureChannelListener.
addSecureChannelListener in interface ServerConnectionl - a ServerConnection.SecureChannelListener
object.public CloseableObject close()
close.
close in interface CloseableObjectCloseableObject object.public Certificate getRemoteCertificate()
getRemoteCertificate.
Certificate object.public void getSecureChannels(Collection<ServerSecureChannel> list)
ServerConnectiongetSecureChannels in interface ServerConnectionlist - list to be filledpublic void removeChannelListener(Channel.ChannelListener listener)
removeChannelListener.
listener - a Channel.ChannelListener
object.public void removeConnectionListener(IConnectionListener listener)
removeConnectionListener in interface ServerConnectionlistener - a IConnectionListener 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.protected abstract CertificateValidator getRemoteCertificateValidator()
CertificateValidator object.protected void onListenerException(RuntimeException rte)
onListenerException in class AbstractState<CloseableObjectState,ServiceResultException>rte - a RuntimeException object.protected void onStateTransition(CloseableObjectState oldState, CloseableObjectState newState)
onStateTransition in class AbstractState<CloseableObjectState,ServiceResultException>oldState - a StateType object.newState - a StateType 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(ServiceResultException e)
setError.
setError in class AbstractState<CloseableObjectState,ServiceResultException>e - a ServiceResultException object.protected void setError(StatusCode sc)
setError.
sc - a StatusCode object.protected void setError(UnsignedInteger errorCode)
setError.
errorCode - a UnsignedInteger object.Copyright © 2026. All rights reserved.