Skip to content

Instantly share code, notes, and snippets.

@mayuroks
Created July 9, 2018 16:39
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 mayuroks/3b22e498bb66d81a1d048e15d2b13d3c to your computer and use it in GitHub Desktop.
Save mayuroks/3b22e498bb66d81a1d048e15d2b13d3c to your computer and use it in GitHub Desktop.
/**
* Main interface for accessing data. It extends EventListener to receive
* incoming events from a remote data source. In this case, a chat server.
*/
public interface DataSource extends EventListener {
void connect(String username) throws URISyntaxException;
void disconnect();
Flowable<ChatMessage> sendMessage(ChatMessage chatMessage);
void setEventListener(EventListener eventListener);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment