Skip to content

Instantly share code, notes, and snippets.

@ThomasGaubert
Created February 3, 2012 02:41
Show Gist options
  • Save ThomasGaubert/1727297 to your computer and use it in GitHub Desktop.
Save ThomasGaubert/1727297 to your computer and use it in GitHub Desktop.
RoketGamer API - Preview
package com.roketgamer.net;
import java.util.ArrayList;
public class ServerStatusListener {
private static ArrayList<ServerStatusListener> listeners = new ArrayList<ServerStatusListener>();
/**
* Constructs <code>ServerStatusListener</code> object
*/
public ServerStatusListener() {
listeners.add(this);
}
/**
* Run when server is offline
*/
public void onServerOffline() {
}
/**
* Run when server is online
*/
public void onServerOnline() {
}
/**
* Returns all instances of ServerStatusListener
* @return ArrayList<ServerStatusListener>
*/
public static ArrayList<ServerStatusListener> getListeners() {
return listeners;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment