megamek.common.net
Class ConnectionListenerAdapter

java.lang.Object
  extended by megamek.common.net.ConnectionListenerAdapter
All Implemented Interfaces:
java.util.EventListener, ConnectionListener

public class ConnectionListenerAdapter
extends java.lang.Object
implements ConnectionListener

This adapter class provides default implementations for the methods declared in the ConnectionListener interface.

Classes that wish to deal with ConnectionEvents can extend this class and override only the methods which they are interested in.

See Also:
ConnectionListener, ConnectionEvent

Constructor Summary
ConnectionListenerAdapter()
           
 
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 The default behavior is to do nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionListenerAdapter

public ConnectionListenerAdapter()
Method Detail

connected

public void connected(ConnectedEvent e)
Called when connection is established. The default behavior is to do nothing.

Specified by:
connected in interface ConnectionListener
Parameters:
e - connection event

disconnected

public void disconnected(DisconnectedEvent e)
Called when connection is closed. The default behavior is to do nothing.

Specified by:
disconnected in interface ConnectionListener
Parameters:
e - connection event

packetReceived

public void packetReceived(PacketReceivedEvent e)
Called when packed received The default behavior is to do nothing.

Specified by:
packetReceived in interface ConnectionListener
Parameters:
e - connection event