🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15930

How can I get the process Id and the thread Id of the caller�s class of an object???

#15930
From: Geraldo Pereira de Souza
Date: Sat, 17 Apr 1999 00:00
37 lines
1588 bytes
Gys,

I�m developing an aplication that need get the Thread Id (thread�s number),
and the Process Id (process�s number)
of the caller�s class of an object.

Ilustration of the problem:

 //Class that need get the process�number and the thread�s number of  its
caller�s class

 Class FtTps
     // get the process�number associated with the Caller�class B
     public int getPid()
    {///// }
      // get the thread�number associated with the Caller�class B
     public int getThreadId()
    {//// }

 public class AppTransaction
 {
  public static String args[]
  {
           Ftps tps = new FtTps();
         // process�number associated with the aplication
          System.out.println("Process�s number = "+  tps.getPid());
         // Thread�number associated with the aplication
         System.out.println("Thread�s number = "+tps.getRhreadId());
     }
  }


Could anybody help me or give me a hint please?

Thanks in advance,
Geraldo P de Souza (souza@fotoninfo.com.br)
Bras�lia-Brazil
Technical Details
Message-ID: <7faea4$nkn10@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,7695d02e11a36a9f,start
X-Google-Attributes: gidf74b3,public
From: "Geraldo Pereira de Souza" <souza@fotoninfo.com.br>
Subject: How can I get the process Id and the thread Id of the caller�s class of an object???
Date: 1999/04/17
Message-ID: <7faea4$nkn10@forums.borland.com>
X-Deja-AN: 467674979
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3