package geniusweb.connection; /** * A Connectable is an object that can connect on request with a provided * {@link ConnectionEnd} and then respond to incoming and outgong signals. * * @param the type of incoming messages * @param the type of outgoing messages */ public interface Connectable { /** * creates the connection. Only called if not yet connected. * * @param connection the new connection */ void connect(ConnectionEnd connection); /** * Removes the connection from a connectable; the previously given * connection can not be used anymore after this call. Only called if * previously connected. * */ void disconnect(); }