Class ServerName
- java.lang.Object
-
- com.ibm.websphere.runtime.ServerName
-
public class ServerName extends java.lang.Object
The ServerName class provides static methods for getting at the display name of the running server.
-
-
Constructor Summary
Constructors Constructor and Description ServerName()
-
Method Summary
Methods Modifier and Type Method and Description static int
getAsid()
Gets the MVS ASID (Address Space IDentifier - 2 byte (short) integer which also identifies a process in z/OS).static byte[]
getControllerStoken()
static java.lang.String
getControllerStokenString()
static java.lang.String
getDisplayName()
Gets the short text display name of the serverstatic java.lang.String
getFullName()
Gets the fully-qualified name of the server in the form of "Domain Name\Node Name\Server Name"static java.lang.String
getjsabjbid()
Gets the jsabjbid value.static java.lang.String
getjsabjbnm()
Gets the jsabjbnm value.static java.lang.String
getjsabpref()
Gets the jsabpref value (STCxxxxx on a JES2 system or the jsabjbnm value on a JES3 system).static int
getPid()
Gets the Unix Process id for the server.static java.lang.String
getPrintableStoken()
Gets the stoken of the space.static java.lang.Long
getServerId()
Gets the Unique Server ID Number (this is -1 for AEs/AEd)static java.lang.String
getSMFId()
Gets the MVS System Management Facility System Identification from the SMCA (CVTSMCA->SMCA.SMCASID)static byte[]
getStoken()
Gets the stoken of the space(an opaque/binary 8 byte unique identifier for an address space/process on z/OS.static void
initialize(java.lang.String cell, java.lang.String node, java.lang.String server)
Deprecated.This method is for WebSphere runtime use only. Applications should not call this method.static void
was390Initialize(byte[] a_stoken, java.lang.String a_printable_stoken, java.lang.String a_jsabpref, int a_pid, int an_asid, java.lang.String a_jsabjbnm)
Deprecated.This method is for WebSphere runtime use only. Applications should not call this method.static void
was390Initialize(byte[] a_stoken, java.lang.String a_printable_stoken, java.lang.String a_jsabpref, int a_pid, int an_asid, java.lang.String a_jsabjbnm, java.lang.String a_smcasid)
Deprecated.This method is for WebSphere runtime use only. Applications should not call this method.static void
was390Initialize(byte[] a_stoken, java.lang.String a_printable_stoken, java.lang.String a_jsabpref, int a_pid, int an_asid, java.lang.String a_jsabjbnm, java.lang.String a_smcasid, java.lang.String a_jsabjbid)
Deprecated.This method is for WebSphere runtime use only. Applications should not call this method.
-
-
-
Method Detail
-
initialize
public static void initialize(java.lang.String cell, java.lang.String node, java.lang.String server)
Deprecated. This method is for WebSphere runtime use only. Applications should not call this method.Initializes the ServerName object attributes to the specified values.- Parameters:
cell
- cell namenode
- node nameserver
- server name
-
getDisplayName
public static java.lang.String getDisplayName()
Gets the short text display name of the server- Returns:
- the name of the server
-
getServerId
public static java.lang.Long getServerId()
Gets the Unique Server ID Number (this is -1 for AEs/AEd)- Returns:
- a long representing the server ID
-
getFullName
public static java.lang.String getFullName()
Gets the fully-qualified name of the server in the form of "Domain Name\Node Name\Server Name"- Returns:
- a string representing the fully-qualified server name
-
was390Initialize
public static void was390Initialize(byte[] a_stoken, java.lang.String a_printable_stoken, java.lang.String a_jsabpref, int a_pid, int an_asid, java.lang.String a_jsabjbnm)
Deprecated. This method is for WebSphere runtime use only. Applications should not call this method.Initializes the z/OS specific ServerName object attributes to the specified values.- Parameters:
a_stoken
- stoken of the server processa_printable_stoken
- stoken as a printable stringa_jsabpref
- Prefix for the server process obtained from the JSAB (job scheduler address space control block)a_pid
- Unix Process id for the server processan_asid
- MVS ASID (Address Space IDentifier) for the server processa_jsabjbnm
- Job name for the server process obtained from the JSAB (job scheduler address space control block)
-
was390Initialize
public static void was390Initialize(byte[] a_stoken, java.lang.String a_printable_stoken, java.lang.String a_jsabpref, int a_pid, int an_asid, java.lang.String a_jsabjbnm, java.lang.String a_smcasid)
Deprecated. This method is for WebSphere runtime use only. Applications should not call this method.Initializes the z/OS specific ServerName object attributes to the specified values.This method is for WebSphere runtime use only. Applications should not call this method.
- Parameters:
a_stoken
- stoken of the server processa_printable_stoken
- stoken as a printable stringa_jsabpref
- Prefix for the server process obtained from the JSAB (job scheduler address space control block)a_pid
- Unix Process id for the server processan_asid
- MVS ASID (Address Space IDentifier) for the server processa_jsabjbnm
- Job name for the server process obtained from the JSAB (job scheduler address space control block)a_smcasid
- MVS System Management Facility System Identification from the SMCA for the server process
-
was390Initialize
public static void was390Initialize(byte[] a_stoken, java.lang.String a_printable_stoken, java.lang.String a_jsabpref, int a_pid, int an_asid, java.lang.String a_jsabjbnm, java.lang.String a_smcasid, java.lang.String a_jsabjbid)
Deprecated. This method is for WebSphere runtime use only. Applications should not call this method.Initializes the z/OS specific ServerName object attributes to the specified values.This method is for WebSphere runtime use only. Applications should not call this method.
- Parameters:
a_stoken
- stoken of the server processa_printable_stoken
- stoken as a printable stringa_jsabpref
- Prefix for the server process obtained from the JSAB (job scheduler address space control block)a_pid
- Unix Process id for the server processan_asid
- MVS ASID (Address Space IDentifier) for the server processa_jsabjbnm
- Job name for the server process obtained from the JSAB (job scheduler address space control block)a_smcasid
- MVS System Management Facility System Identification from the SMCA for the server processa_jsabjbid
- Job Id for the server process obtained from the JSAB (job scheduler address space control block)
-
getStoken
public static byte[] getStoken()
Gets the stoken of the space(an opaque/binary 8 byte unique identifier for an address space/process on z/OS. The value is never reused for the life of the OS). Might not be available on all platforms.- Returns:
- the stoken as a byte array (8 bytes)
-
getPrintableStoken
public static java.lang.String getPrintableStoken()
Gets the stoken of the space. Might not be available on all platforms.- Returns:
- the stoken as a printable string
-
getjsabpref
public static java.lang.String getjsabpref()
Gets the jsabpref value (STCxxxxx on a JES2 system or the jsabjbnm value on a JES3 system).Most likely you will want to use the jsabjbid value. The jsabjbid will be the STCxxxxx value if running on a JES2 system, or typically a JOBxxxxx value if running on a JES3 system.
Short for JSAB prefix. Every process which is started from the operator console is assigned a printable 8 byte name, usually beginning with STC followed by 5 numbers (like STC00123). Leading zeroes are always present. This is not the printable version of a STOKEN. The name is only unique among active processes. So, if a process terminates, the next process that starts MIGHT reuse this name. Might not be available on all platforms.
- Returns:
- the jsab prefix string
-
getjsabjbnm
public static java.lang.String getjsabjbnm()
Gets the jsabjbnm value. Short for JSAB job name. Every process on z/OS has a job name. Name is not necessarily unique among active processes. In fact, all zWAS servants probably have the same jobname. The name comes from the jobname= parameter specified in the JCL used to start the servant region. This name is known/used by many zWAS tools etc. Might not be available on all platforms.- Returns:
- the jsab jobname string
-
getjsabjbid
public static java.lang.String getjsabjbid()
Gets the jsabjbid value. The jsabjbid will be the STCxxxxx value if running on a JES2 system, or typically a JOBxxxxx value if running on a JES3 system.- Returns:
- the jsab jobid string
-
getPid
public static int getPid()
Gets the Unix Process id for the server. Might not be available on all platforms.- Returns:
- the integer process id
-
getAsid
public static int getAsid()
Gets the MVS ASID (Address Space IDentifier - 2 byte (short) integer which also identifies a process in z/OS). Might not be available on all platforms.- Returns:
- the MVS asid
-
getSMFId
public static java.lang.String getSMFId()
Gets the MVS System Management Facility System Identification from the SMCA (CVTSMCA->SMCA.SMCASID)- Returns:
- the SMF SID
-
getControllerStoken
public static byte[] getControllerStoken()
- Returns:
- The controller region STOKEN, or null if this address space does not have an associated controller region.
-
getControllerStokenString
public static java.lang.String getControllerStokenString()
- Returns:
- The controller region STOKEN, as a string of hexadecimal chars, or null if this address space is not associated with a controller region.
-
-