You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
490 B
27 lines
490 B
11 years ago
|
package mightypork.utils.patterns.subscription;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Subscribable object
|
||
|
*
|
||
|
* @author MightyPork
|
||
|
*/
|
||
|
public interface Subscribable {
|
||
|
|
||
|
/**
|
||
|
* Subscribe a client to messages from this object
|
||
|
*
|
||
|
* @param client a subscribing client
|
||
|
* @return true if client is now subscribed
|
||
|
*/
|
||
|
public boolean addSubscriber(Object client);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Unsubscribe a client from from this object
|
||
|
*
|
||
|
* @param client a clientto unsubscribe
|
||
|
*/
|
||
|
public void removeSubscriber(Object client);
|
||
|
}
|