Package org.cspoker.server.embedded.chat.room

Examples of org.cspoker.server.embedded.chat.room.TableChatRoom


  public void sendServerMessage(Player player, String message) {
    serverChatRoom.sendMessage(player, message);
  }

  public void sendTableMessage(long tableId,Player player, String message) {
    TableChatRoom chatroom = tables.get(new TableId(tableId));
    chatroom.sendMessage(player, message);
  }
View Full Code Here


  public void sendTableMessage(long tableId,Player player, String message) {
    TableChatRoom chatroom = tables.get(new TableId(tableId));
    chatroom.sendMessage(player, message);
  }
  public TableChatRoom addTableChatRoom(PokerTable table){
    return tables.put(table.getTableId(),new TableChatRoom(table));
  }
View Full Code Here

  }

  public void subscribe(ChatListener chatlistener, TableId id, PlayerId id2) {
    if(id==null)
      throw new IllegalArgumentException("TableId isn't effective!");
    TableChatRoom room=tables.get(id);
    if(room==null)
      throw new IllegalArgumentException("There exists no table with the given id!");
    if(room.getTable().hasAsJoinedPlayer(id2)){
      // only players who joined the table, are allowed to subscribe their listener
      room.subscribe(chatlistener);
    }
  }
View Full Code Here

  }
 
  public void unsubscribe(ChatListener chatlistener, TableId id, PlayerId id2) {
    if(id==null)
      throw new IllegalArgumentException("TableId isn't effective!");
    TableChatRoom room=tables.get(id);
    if(room==null)
      throw new IllegalArgumentException("There exists no table with the given id!");
    if(room.getTable().hasAsJoinedPlayer(id2)){
      // only players who joined the table, are allowed to unsubscribe their listener
      room.unSubscribe(chatlistener);
    }
  }
View Full Code Here

TOP

Related Classes of org.cspoker.server.embedded.chat.room.TableChatRoom

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.