Browse Source

javadoc

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277540 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
3fa4c3cb91
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      src/main/org/apache/tools/ant/taskdefs/optional/condition/IsPingable.java

+ 11
- 6
src/main/org/apache/tools/ant/taskdefs/optional/condition/IsPingable.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 2004 The Apache Software Foundation
* Copyright 2004-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,24 +40,29 @@ import java.io.IOException;
public class IsPingable extends ProjectComponent implements Condition {

private String host;
/** The default timeout. */
public static final int DEFAULT_TIMEOUT = 30;
private int timeout = DEFAULT_TIMEOUT;
/** Error when no hostname is defined */
public static final String ERROR_NO_HOSTNAME = "No hostname defined";
/** Error when invalid timeout value is defined */
public static final String ERROR_BAD_TIMEOUT = "Invalid timeout value";
/** Unknown host message is seen. */
public static final String ERROR_UNKNOWN_HOST = "Unknown host:";
/** Network error message is seen. */
public static final String ERROR_ON_NETWORK = "network error to ";

/**
* the host to ping
* @param host
* The host to ping.
* @param host the host to ping.
*/
public void setHost(String host) {
this.host = host;
}

/**
* timeout for the reachability test -in seconds
* @param timeout
* Timeout for the reachability test -in seconds.
* @param timeout the timeout in seconds.
*/
public void setTimeout(int timeout) {
this.timeout = timeout;
@@ -66,7 +71,7 @@ public class IsPingable extends ProjectComponent implements Condition {
/**
* Is this condition true?
*
* @return true if the condition is true
* @return true if the condition is true.
* @throws org.apache.tools.ant.BuildException
* if an error occurs
*/


Loading…
Cancel
Save