package geniusweb.connection; /** * a socket for a general two-way connection * * @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(Connection 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(); }