org.opcfoundation.ua.common
Class DebugLogger

java.lang.Object
  extended by org.opcfoundation.ua.common.DebugLogger
All Implemented Interfaces:
ConnectionMonitor.ConnectListener, ServerConnection.SecureChannelListener, StateListener<CloseableObjectState>

public class DebugLogger
extends Object
implements ConnectionMonitor.ConnectListener, ServerConnection.SecureChannelListener, StateListener<CloseableObjectState>

Connect monitor prints to logger server's connect and secure channel events. Example: UABinding binding; binding.addConnectionListener(new ConnectMonitor());

Author:
Toni Kalajainen (toni.kalajainen@iki.fi)

Constructor Summary
DebugLogger(org.slf4j.Logger logger)
          Constructor for DebugLogger.
 
Method Summary
 void onClose(Object sender, ServerConnection connection)
          
 void onConnect(Object sender, ServerConnection connection)
          
 void onSecureChannelAttached(Object sender, ServerSecureChannel channel)
          
 void onSecureChannelDetached(Object sender, ServerSecureChannel channel)
          
 void onStateTransition(IStatefulObject<CloseableObjectState,?> sender, CloseableObjectState oldState, CloseableObjectState newState)
          onStateTransition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugLogger

public DebugLogger(org.slf4j.Logger logger)

Constructor for DebugLogger.

Parameters:
logger - a Logger object.
Method Detail

onConnect

public void onConnect(Object sender,
                      ServerConnection connection)

Specified by:
onConnect in interface ConnectionMonitor.ConnectListener

onSecureChannelAttached

public void onSecureChannelAttached(Object sender,
                                    ServerSecureChannel channel)

Specified by:
onSecureChannelAttached in interface ServerConnection.SecureChannelListener

onStateTransition

public void onStateTransition(IStatefulObject<CloseableObjectState,?> sender,
                              CloseableObjectState oldState,
                              CloseableObjectState newState)

onStateTransition.

Specified by:
onStateTransition in interface StateListener<CloseableObjectState>
Parameters:
sender - a IStatefulObject object.
oldState - a CloseableObjectState object.
newState - a CloseableObjectState object.

onSecureChannelDetached

public void onSecureChannelDetached(Object sender,
                                    ServerSecureChannel channel)

Specified by:
onSecureChannelDetached in interface ServerConnection.SecureChannelListener

onClose

public void onClose(Object sender,
                    ServerConnection connection)

Specified by:
onClose in interface ConnectionMonitor.ConnectListener


Copyright © 2018. All rights reserved.