站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

PID (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util.platform
Class PID

java.lang.Object
  extended byorg.jboss.util.platform.PID
All Implemented Interfaces:
Cloneable, Serializable

public class PID
extends Object
implements Serializable, Cloneable

Provides access to the process identifier for this virtual machine.

Currently does not support native access and generates random numbers for the process id.

Version:
$Revision: 1.1 $
Author:
Jason Dillon
See Also:
Serialized Form

Field Summary
protected  int id
          The int process identifier.
 
Constructor Summary
protected PID(int id)
          Construct a new PID.
 
Method Summary
 Object clone()
          Returns a copy of this PID.
 boolean equals(Object obj)
          Check if the given object is equal to this PID.
 int getID()
          Get the int process identifier.
static PID getInstance()
          Get the PID for the current virtual machine.
 int hashCode()
          Return the hash code of this PID.
 String toString()
          Return a string representation of this PID.
 String toString(int radix)
          Return a string representation of this PID.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected final int id
The int process identifier.

Constructor Detail

PID

protected PID(int id)
Construct a new PID.

Parameters:
id - Process identifier.
Method Detail

getID

public final int getID()
Get the int process identifier.

Returns:
int process identifier.

toString

public String toString()
Return a string representation of this PID.

Returns:
A string representation of this PID.

toString

public String toString(int radix)
Return a string representation of this PID.

Returns:
A string representation of this PID.

hashCode

public int hashCode()
Return the hash code of this PID.

Returns:
The hash code of this PID.

equals

public boolean equals(Object obj)
Check if the given object is equal to this PID.

Parameters:
obj - Object to test equality with.
Returns:
True if object is equals to this PID.

clone

public Object clone()
Returns a copy of this PID.

Returns:
A copy of this PID.

getInstance

public static PID getInstance()
Get the PID for the current virtual machine.

Returns:
Process identifier.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.