|
||||||||||
| 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
org.opcfoundation.ua.transport.tcp.nio.OpcTcpServerConnection
public class OpcTcpServerConnection
OpcTcpServerConnection class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.opcfoundation.ua.transport.ServerConnection |
|---|
ServerConnection.SecureChannelListener |
| Method Summary | |
|---|---|
void |
addConnectionListener(IConnectionListener listener)
Add response listener |
protected void |
cancelTimeoutTimer()
cancelTimeoutTimer. |
CloseableObject |
close()
close. |
protected void |
endChunkSend(ByteBuffer chunk)
Flushes queued chunks (see startChunkSend()) |
protected BufferMonitorState |
flush(long position)
flush. |
static long |
getHandshakeTimeout()
Getter for the field handshakeTimeout. |
SocketAddress |
getLocalAddress()
Get local socket address |
SocketAddress |
getRemoteAddress()
Get remote socket address |
protected CertificateValidator |
getRemoteCertificateValidator()
Remote Certificate Validator, invoked upon connect |
protected void |
handleAcknowledgeMessage(Acknowledge a)
handleAcknowledgeMessage. |
protected void |
handleAsymmChunk(ByteBuffer chunk)
handleAsymmChunk. |
protected void |
handleChunk(ByteBuffer chunk)
handleChunk. |
protected void |
handleCloseChunk(ByteBuffer chunk)
handleCloseChunk. |
protected void |
handleCloseSecureChannelRequest(InputMessage mb)
handleCloseSecureChannelRequest. |
protected void |
handleErrorMessage(ErrorMessage e)
handleErrorMessage. |
protected void |
handleHelloMessage(Hello h)
handleHelloMessage. |
protected void |
handleOpenSecureChannelRequest(InputMessage mb)
handleOpenSecureChannelRequest. |
protected void |
handleRawChunk(ByteBuffer chunk)
handleRawChunk. |
protected void |
handleSecureMessage(InputMessage mb)
handleSecureMessage. |
protected void |
handleSymmChunk(ByteBuffer chunk)
handleSymmChunk. |
protected void |
onStateTransition(CloseableObjectState oldState,
CloseableObjectState newState)
Override this. |
void |
removeConnectionListener(IConnectionListener listener)
Add response listener |
protected void |
sendAcknowledge(Acknowledge a)
sendAcknowledge. |
protected int |
sendAsymmSecureMessage(AsyncWrite msg,
SecurityConfiguration securityConfiguration,
int secureChannelId,
int requestNumber,
AtomicInteger sendSequenceNumber)
sendAsymmSecureMessage. |
protected void |
sendChunks(ByteBuffer... chunks)
Send chunks. |
protected void |
sendError(ErrorMessage e)
sendError. |
protected void |
sendHello(Hello h)
sendHello. |
protected void |
sendSecureMessage(AsyncWrite msg,
SecurityToken token,
int requestId,
int messageType,
AtomicInteger sendSequenceNumber)
sendSecureMessage. |
protected void |
setError(ServiceResultException e)
setError. |
static void |
setHandshakeTimeout(long handshakeTimeout)
Define the handshake timeout for new connections. |
protected void |
startChunkSend(ByteBuffer... chunks)
Put chunks into send queue. |
| Methods inherited from class org.opcfoundation.ua.transport.tcp.nio.AbstractServerConnection |
|---|
addChannelListener, addSecureChannelListener, fireSecureChannelAttached, fireSecureChannelDetached, getConnectURL, getRemoteCertificate, getSecureChannels, onListenerException, removeChannelListener, removeSecureChannelListener, setError, setError, 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.utils.IStatefulObject |
|---|
addStateListener, addStateNotifiable, getError, getState, removeStateListener, removeStateNotifiable, waitForState, waitForState, waitForStateUninterruptibly |
| Method Detail |
|---|
public static long getHandshakeTimeout()
Getter for the field handshakeTimeout.
public static void setHandshakeTimeout(long handshakeTimeout)
handshakeTimeout - the handshakeTimeout to set. Default 600000 = 10 minutes.public void addConnectionListener(IConnectionListener listener)
addConnectionListener in interface ServerConnectionaddConnectionListener in class AbstractServerConnectionlistener - a IConnectionListener object.public CloseableObject close()
close.
close in interface CloseableObjectclose in class AbstractServerConnectionCloseableObject object.public SocketAddress getLocalAddress()
public SocketAddress getRemoteAddress()
public void removeConnectionListener(IConnectionListener listener)
removeConnectionListener in interface ServerConnectionremoveConnectionListener in class AbstractServerConnectionlistener - a IConnectionListener object.protected void cancelTimeoutTimer()
cancelTimeoutTimer.
protected void endChunkSend(ByteBuffer chunk)
chunk - chunk to send
protected BufferMonitorState flush(long position)
throws InterruptedException,
IOException
flush.
position - a long.
BufferMonitorState object.
InterruptedException - if any.
IOException - if any.protected CertificateValidator getRemoteCertificateValidator()
getRemoteCertificateValidator in class AbstractServerConnectionCertificateValidator object.
protected void handleAcknowledgeMessage(Acknowledge a)
throws ServiceResultException
handleAcknowledgeMessage.
a - a Acknowledge object.
ServiceResultException - if any.
protected void handleAsymmChunk(ByteBuffer chunk)
throws ServiceResultException
handleAsymmChunk.
chunk - a ByteBuffer object.
ServiceResultException - if any.
protected void handleChunk(ByteBuffer chunk)
throws ServiceResultException
handleChunk.
chunk - a ByteBuffer object.
ServiceResultException - if any.
protected void handleCloseChunk(ByteBuffer chunk)
throws ServiceResultException
handleCloseChunk.
chunk - a ByteBuffer object.
ServiceResultException - if any.
protected void handleCloseSecureChannelRequest(InputMessage mb)
throws ServiceResultException
handleCloseSecureChannelRequest.
mb - a InputMessage object.
ServiceResultException - if any.protected void handleErrorMessage(ErrorMessage e)
handleErrorMessage.
e - a ErrorMessage object.
protected void handleHelloMessage(Hello h)
throws ServiceResultException
handleHelloMessage.
h - a Hello object.
ServiceResultException - if any.
protected void handleOpenSecureChannelRequest(InputMessage mb)
throws ServiceResultException
handleOpenSecureChannelRequest.
mb - a InputMessage object.
ServiceResultException - if any.protected void handleRawChunk(ByteBuffer chunk)
handleRawChunk.
chunk - a ByteBuffer object.
protected void handleSecureMessage(InputMessage mb)
throws ServiceResultException
handleSecureMessage.
mb - a InputMessage object.
ServiceResultException - if any.
protected void handleSymmChunk(ByteBuffer chunk)
throws ServiceResultException
handleSymmChunk.
chunk - a ByteBuffer object.
ServiceResultException - if any.
protected void onStateTransition(CloseableObjectState oldState,
CloseableObjectState newState)
onStateTransition in class AbstractServerConnectionoldState - a StateType object.newState - a StateType object.
protected void sendAcknowledge(Acknowledge a)
throws ServiceResultException
sendAcknowledge.
a - a Acknowledge object.
ServiceResultException - if any.
protected int sendAsymmSecureMessage(AsyncWrite msg,
SecurityConfiguration securityConfiguration,
int secureChannelId,
int requestNumber,
AtomicInteger sendSequenceNumber)
throws ServiceResultException
sendAsymmSecureMessage.
Send asymmetric secure message.
sendAsymmSecureMessage in class AbstractServerConnectionmsg - a AsyncWrite object.securityConfiguration - a SecurityConfiguration object.secureChannelId - a int.requestNumber - a int.sendSequenceNumber - a AtomicInteger object.
ServiceResultException - if any.protected void sendChunks(ByteBuffer... chunks)
chunks - a ByteBuffer object.
protected void sendError(ErrorMessage e)
throws ServiceResultException
sendError.
e - a ErrorMessage object.
ServiceResultException - if any.protected void sendHello(Hello h)
sendHello.
h - a Hello object.
protected void sendSecureMessage(AsyncWrite msg,
SecurityToken token,
int requestId,
int messageType,
AtomicInteger sendSequenceNumber)
sendSecureMessage.
Send symmetric secure message
sendSecureMessage in class AbstractServerConnectionmsg - 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 AbstractServerConnectione - a ServiceResultException object.protected void startChunkSend(ByteBuffer... chunks)
chunks - a ByteBuffer object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||