Package org.openmuc.j60870
Interface ConnectionEventListener
-
- All Superinterfaces:
java.util.EventListener
public interface ConnectionEventListener extends java.util.EventListener
The listener interface for receiving incoming ASDUs and connection closed events. The class that is interested in incoming ASDUs implements this interface. The object of that class is registered as a listener through theClientConnectionBuilder.setConnectionEventListener(ConnectionEventListener)
or returned byServerEventListener.connectionIndication(Connection)
. Incoming ASDUs are queued so thatnewASdu(Connection connection, ASdu)
is never called simultaneously for the same connection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
connectionClosed(Connection connection, java.io.IOException cause)
Invoked when an IOException occurred while listening for incoming ASDUs.void
dataTransferStateChanged(Connection connection, boolean stopped)
Informs when the state of data transfer changed.void
newASdu(Connection connection, ASdu aSdu)
Invoked when a new ASDU arrives.
-
-
-
Method Detail
-
newASdu
void newASdu(Connection connection, ASdu aSdu)
Invoked when a new ASDU arrives.- Parameters:
aSdu
- the ASDU that arrived.
-
connectionClosed
void connectionClosed(Connection connection, java.io.IOException cause)
Invoked when an IOException occurred while listening for incoming ASDUs. An IOException implies that theConnection
that feeds this listener was automatically closed and can no longer be used to send commands or receive ASDUs.- Parameters:
cause
- the exception that occurred.
-
dataTransferStateChanged
void dataTransferStateChanged(Connection connection, boolean stopped)
Informs when the state of data transfer changed.- Parameters:
stopped
- true if data transfer stopped, false if data transfer started
-
-