<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'updating and using String in multiple threads' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'updating and using String in multiple threads' posted on the 'Java' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 20:20:09 -0700</pubDate>
    <lastBuildDate>Wed, 19 Jun 2013 20:20:09 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>updating and using String in multiple threads</title>
      <link>http://www.programmersheaven.com/mb/java/423595/423595/updating-and-using-string-in-multiple-threads/</link>
      <description>Hello all,&lt;br /&gt;
&lt;br /&gt;
I am attempting to create a basic chat program and I am having some difficulties as I am trying to use threads for it. There is a single Server object that listens for Client connects, and assigns each one to its own thread. The problem is that I'd like all threads to 'receive' any string generated by all clients, for outputting purposes.&lt;br /&gt;
&lt;br /&gt;
Can I have an instance variable in my Server class that each thread can write to as well as outputting that variable if it has been outdated since last check, or is that just nonsense? A little new to threading here...&lt;br /&gt;
&lt;br /&gt;
Thanks in advance,&lt;br /&gt;
&lt;br /&gt;
-UE &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java/423595/423595/updating-and-using-string-in-multiple-threads/</guid>
      <pubDate>Mon, 02 May 2011 23:55:42 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Re: updating and using String in multiple threads</title>
      <link>http://www.programmersheaven.com/mb/java/423595/424224/re-updating-and-using-string-in-multiple-threads/#424224</link>
      <description>Your server needs to keep track of all connected clients. if it receives a message from any client then it needs to notify all other connected clients. You need something like a handler that will control/handle any client request/responses.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java/423595/424224/re-updating-and-using-string-in-multiple-threads/#424224</guid>
      <pubDate>Mon, 11 Jul 2011 00:50:55 -0700</pubDate>
      <category>Java</category>
    </item>
  </channel>
</rss>