|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.access.AS400JPing
The AS400JPing class is used to determine if AS/400 services are running.
Here is an example of calling AS400JPing within a Java program to ping the AS400 Remote Command Service:
AS400JPing pingObj = new AS400JPing("myAS400", AS400.COMMAND, false); if (pingObj.ping()) System.out.println("SUCCESS"); else System.out.println("FAILED");
Field Summary | |
static int |
ALL_SERVICES
Constant for pinging all the AS/400 services. |
Constructor Summary | |
AS400JPing(java.lang.String systemName)
Constructs an AS400JPing object with the specified systemName. |
|
AS400JPing(java.lang.String systemName,
int service)
Constructs an AS400JPing object with the specified systemName and service. |
|
AS400JPing(java.lang.String systemName,
int service,
boolean useSSL)
Constructs an AS400JPing object. |
Method Summary | |
boolean |
ping()
Ping the AS/400. |
boolean |
ping(int service)
Ping a specific AS/400 service. |
void |
setPrintWriter(java.io.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(java.lang.String systemName)
systemName
- The AS/400 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").public AS400JPing(java.lang.String systemName, int service)
systemName
- The AS/400 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 AS/40 service to ping. One of the following constants: AS400.FILE,
AS400.DATABASE, AS400.COMMAND, AS400.SIGNON, AS400.CENTRAL, AS400.DATAQUEUE,
AS400.RECORDACCESS, AS400.PRINT, or ALL_SERVICES.AS400
public AS400JPing(java.lang.String systemName, int service, boolean useSSL)
systemName
- The AS/400 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 AS/400 service to ping. One of the following constants: AS400.FILE, AS400.DATABASE,
AS400.COMMAND, AS400.SIGNON, AS400.CENTRAL, AS400.DATAQUEUE,
AS400.RECORDACCESS, AS400.PRINT, or ALL_SERVICES.useSSL
- true if the pinging the SSL port for the service, false otherwise. The default is false.AS400
Method Detail |
public boolean ping()
public boolean ping(int service)
public void setPrintWriter(java.io.OutputStream stream) throws java.io.IOException
OutputStream
- The OutputStream.java.io.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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |