megamek.common.net
Interface ConnectionListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
ConnectionListenerAdapter

public interface ConnectionListener
extends java.util.EventListener

Classes which implement this interface provide methods that deal with the events that are generated when the something happened in the connection.

After creating an instance of a class that implements this interface it can be added to a Connection using the addConnectionListener method and removed using the removeConnectionListener method. When the Connection is changed the appropriate method will be invoked.

See Also:
ConnectionListenerAdapter, ConnectionEvent

Method Summary
 void connected(ConnectedEvent e)
          Called when connection is established
 void disconnected(DisconnectedEvent e)
          Called when connection is closed
 void packetReceived(PacketReceivedEvent e)
          Called when packed received
 

Method Detail

connected

void connected(ConnectedEvent e)
Called when connection is established

Parameters:
e - connection event

disconnected

void disconnected(DisconnectedEvent e)
Called when connection is closed

Parameters:
e - connection event

packetReceived

void packetReceived(PacketReceivedEvent e)
Called when packed received

Parameters:
e - connection event