Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Channels
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();
}
@dredhorse

This comment has been minimized.

Copy link

@dredhorse dredhorse commented Nov 18, 2014

removeMember should probably be boolean.
i gather MultiChannel would than be per User?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment