Examples of ReadWriteArrayList


Examples of org.jboss.remoting.samples.chat.utility.ReadWriteArrayList

  transient private Collection chatReceivers;

  public ExtendedChatInfo(ChatInfo chatInfo)
  {
    this.chatInfo = chatInfo;
    messages = new ReadWriteArrayList();
    members =  Collections.synchronizedCollection(new HashSet());
    threadMap =  new Hashtable();
    chatReceivers = Collections.synchronizedCollection(new HashSet());
  }
View Full Code Here

Examples of org.jboss.remoting.samples.chat.utility.ReadWriteArrayList

  
  
   protected ArrayList getBackChat(Object[] args) throws ShuttingDownException
   {
      shutDownGate.enter();
      ReadWriteArrayList messages = extendedChatInfo.getMessages();

      if (messages == null)
      {
         System.out.println("messages == null");
         messages = new ReadWriteArrayList();
      }

      ArrayList returnMessages = messages.toArrayList();
      shutDownGate.leave();
      return returnMessages;
   }
View Full Code Here

Examples of org.jboss.remoting.samples.chat.utility.ReadWriteArrayList

  
   protected void send(Object[] args) throws ShuttingDownException
   {
      ChatMessage mesg = (ChatMessage) args[0];
      shutDownGate.enter();
      ReadWriteArrayList messages = extendedChatInfo.getMessages();
      messages.add(mesg);
      shutDownGate.leave();
   }  
View Full Code Here

Examples of org.jboss.remoting.samples.chat.utility.ReadWriteArrayList

   public void createChat(final String description, final ChatMember owner) throws CreateConnectionException
   {
      Thread t = new Thread()
      {
         TalkFrame talkFrame = new TalkFrame(description, owner.get_name(), parent);
         ReadWriteArrayList outgoingLines = new ReadWriteArrayList();
         ChatServer chatServer = null;
        
         public void run()
         {
            try
View Full Code Here

Examples of org.jboss.remoting.samples.chat.utility.ReadWriteArrayList

   public void join(final ChatInfo chatInfo, final ChatMember newMember) throws JoinConnectionException
   {
      Thread t = new Thread()
      {
         TalkFrame talkFrame = new TalkFrame(chatInfo.get_description(), newMember.get_name(), parent);
         ReadWriteArrayList outgoingLines = new ReadWriteArrayList();
         Wrapper remoteChatServerWrapper = new Wrapper();
         ChatServer chatServer = null;
        
         public void run()
         {
View Full Code Here

Examples of org.jboss.remoting.samples.chat.utility.ReadWriteArrayList

/*     */
/*     */   protected ArrayList getBackChat(Object[] args)
/*     */     throws ShuttingDownException
/*     */   {
/*  84 */     this.shutDownGate.enter();
/*  85 */     ReadWriteArrayList messages = this.extendedChatInfo.getMessages();
/*     */
/*  87 */     if (messages == null)
/*     */     {
/*  89 */       System.out.println("messages == null");
/*  90 */       messages = new ReadWriteArrayList();
/*     */     }
/*     */
/*  93 */     ArrayList returnMessages = messages.toArrayList();
/*  94 */     this.shutDownGate.leave();
/*  95 */     return returnMessages;
/*     */   }
View Full Code Here

Examples of org.jboss.remoting.samples.chat.utility.ReadWriteArrayList

/*     */   protected void send(Object[] args)
/*     */     throws ShuttingDownException
/*     */   {
/* 121 */     ChatMessage mesg = (ChatMessage)args[0];
/* 122 */     this.shutDownGate.enter();
/* 123 */     ReadWriteArrayList messages = this.extendedChatInfo.getMessages();
/* 124 */     messages.add(mesg);
/* 125 */     this.shutDownGate.leave();
/*     */   }
View Full Code Here

Examples of org.jboss.remoting.samples.chat.utility.ReadWriteArrayList

/*    */   private transient Collection chatReceivers;
/*    */
/*    */   public ExtendedChatInfo(ChatInfo chatInfo)
/*    */   {
/* 38 */     this.chatInfo = chatInfo;
/* 39 */     this.messages = new ReadWriteArrayList();
/* 40 */     this.members = Collections.synchronizedCollection(new HashSet());
/* 41 */     this.threadMap = new Hashtable();
/* 42 */     this.chatReceivers = Collections.synchronizedCollection(new HashSet());
/*    */   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.