Skip to content

Instantly share code, notes, and snippets.

@hornd
Created August 3, 2014 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hornd/ac5825855c1cb72d733c to your computer and use it in GitHub Desktop.
Save hornd/ac5825855c1cb72d733c to your computer and use it in GitHub Desktop.
package me.lory;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.Collection;
import me.lory.irc.ServerDescription;
/**
* Describes an IRC server and a connection to that IRC server. Servers are
* described by {@link ServerDescription}.
*
* @author hornd
*
*/
public interface IServer extends IServerMessageDispatcher {
/**
* Connect to this server.
*
* @throws IOException
* @throws UnknownHostException
*/
void connect() throws IOException, UnknownHostException;
/**
* Disconnect from this server.
*
* @throws IOException
*/
void disconnect() throws IOException;
/**
* Returns true if connected, false otherwise.
*/
boolean isConnected();
/**
* Return the collection of conversations associated with
* this server.
* @return
*/
Collection<IConversation> getConversations();
/**
* Return the status conversation associated with this server.
* @return
*/
IConversation getStatusConversation();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment