Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-04-2007, 07:33 AM
Member
 
Join Date: Mar 2007
Posts: 13
ferosh is on a distinguished road
Server n threads
I have seen a couple of sample applications in which server components are written inside the run method of a thread class.
What is the purpose of this ? Does this show that the application has multiple servers ?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-04-2007, 07:41 AM
Member
 
Join Date: Mar 2007
Posts: 13
ferosh is on a distinguished road
I expect you to paste the code here
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-28-2007, 11:42 PM
ali ali is offline
Member
 
Join Date: Apr 2007
Posts: 7
ali is on a distinguished road
I am in a bit of a hurry at the moment so I will leave the code for later, right now I will just answer the main question.

If I understand the question correctly, you want to know why some of the components in the server are sometimes placed in the run method of the thread class.

The components of the server are written in the run method of the thread class so that when many different clients are connected to the server, the server can cater for each one of them by creating a separate thread for that particular client which ensures that even if multiple clients are requesting the same services, they can be served.

Hope this helps, will send the code example along with explanation later
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use Java threads Java Tip java.lang 0 04-09-2008 07:30 PM
Java Threads JavaForums Java Blogs 0 12-17-2007 01:21 PM
Using threads Java Tip Java Tips 0 12-11-2007 11:25 AM
Threads one198 Threads and Synchronization 1 11-20-2007 07:15 PM
Using threads as a countdowntimer lacoste Threads and Synchronization 4 07-20-2007 02:06 PM


All times are GMT +3. The time now is 04:02 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org