|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.as400.access.AS400JPing
public class AS400JPing
Determines if services are running on the IBM i system.
Here is an example of calling AS400JPing within a Java program to ping the Remote Command Service:
AS400JPing pingObj = new AS400JPing("myAS400", AS400.COMMAND, false);
if (pingObj.ping())
System.out.println("SUCCESS");
else
System.out.println("FAILED");
JPing| Field Summary | |
|---|---|
static int |
ALL_SERVICES
Constant for pinging all the services. |
| Constructor Summary | |
|---|---|
AS400JPing(String systemName)
Constructs an AS400JPing object with the specified systemName. |
|
AS400JPing(String systemName,
int service)
Constructs an AS400JPing object with the specified systemName and service. |
|
AS400JPing(String systemName,
int service,
boolean useSSL)
Constructs an AS400JPing object. |
|
| Method Summary | |
|---|---|
boolean |
ping()
Ping the system. |
boolean |
ping(int service)
Ping a specific service. |
boolean |
pingAllServices()
Ping all services. |
void |
setPrintWriter(OutputStream stream)
Set the PrintWriter to log ping information to. |
void |
setTimeout(long time)
Set the timeout period in milliseconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ALL_SERVICES
| Constructor Detail |
|---|
public AS400JPing(String systemName)
systemName - The system to ping. The systemName string can be in 3 forms: shortname (eg. "myAS400"), longname (eg. "myAS400.myCompany.com"), or IP address (eg. "9.1.2.3").AS400.getSystemName()
public AS400JPing(String systemName,
int service)
systemName - The system to ping. The systemName string can be in 3 forms: shortname (eg. "myAS400"), longname (eg. "myAS400.myCompany.com"), or IP address (eg. "9.1.2.3").service - The service to ping. Valid services are:
AS400.FILE - the IFS file service
AS400.PRINT - the print service
AS400.COMMAND - the command and program call service
AS400.DATAQUEUE - the data queue service
AS400.DATABASE - the JDBC service
AS400.RECORDACCESS - the record level access service
AS400.CENTRAL - the license management service
AS400.SIGNON - the sign-on service
ALL_SERVICES - all services
AS400.getSystemName()
public AS400JPing(String systemName,
int service,
boolean useSSL)
systemName - The system to ping. The systemName string can be in 3 forms: shortname (eg. "myAS400"), longname (eg. "myAS400.myCompany.com"), or IP address (eg. "9.1.2.3").service - The service to ping. Valid services are:
AS400.FILE - the IFS file service
AS400.PRINT - the print service
AS400.COMMAND - the command and program call service
AS400.DATAQUEUE - the data queue service
AS400.DATABASE - the JDBC service
AS400.RECORDACCESS - the record level access service
AS400.CENTRAL - the license management service
AS400.SIGNON - the sign-on service
ALL_SERVICES - all services
useSSL - true if the pinging the SSL port for the service, false otherwise. The default is false.AS400.getSystemName()| Method Detail |
|---|
public boolean ping()
pingAllServices()public boolean ping(int service)
service - The service to ping. Valid services are:
AS400.FILE - the IFS file service
AS400.PRINT - the print service
AS400.COMMAND - the command and program call service
AS400.DATAQUEUE - the data queue service
AS400.DATABASE - the JDBC service
AS400.RECORDACCESS - the record level access service
AS400.CENTRAL - the license management service
AS400.SIGNON - the sign-on service
public boolean pingAllServices()
ping() in that it doesn't immediately return when a failed ping is encountered, but rather continues until all services have been pinged.
public void setPrintWriter(OutputStream stream)
throws IOException
stream - The OutputStream.
IOException - If an error occurs while accessing the stream.public void setTimeout(long time)
time - The timeout period.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||