-
-
Save Lunaphied/561c512b4408a72376d2 to your computer and use it in GitHub Desktop.
Channels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ChannelReciever { | |
public void sendMessage(String message); | |
} | |
public interface ChannelFormatter { | |
public String formatMessage(ChannelReciever member, String message); | |
} | |
public interface Channel { | |
String getChannelName(); | |
String sendMessage(String message); | |
void addMember(ChannelReceiver member); | |
void removeMember(ChannelReceiver member); | |
List<ChannelReceiver> getMembers(); | |
void setFormatter(ChannelFormater formatter); | |
ChannelFormater getFormatter(); | |
} | |
public interface ChannelFilter { | |
Channel selectChannel(ChannelReceiver member, MultiChannel multiChannel); | |
} | |
public interface MultiChannel { | |
void registerChannel(Channel channel, int priority); | |
int getPriority(Channel channel); | |
List<Channel> getRegisteredChannels(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
removeMember should probably be boolean.
i gather MultiChannel would than be per User?