|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
ise.antelope.tasks.HostnameTask
public class HostnameTask
A task to put hostname or IP in a property. The default property is 'hostname'.
I updated this task in Apr 2005 to be able to show all hostnames and IP's for the local machine, which is sometimes handy for machines with dual cards, like maybe an ethernet card and a wireless card.
Dale Anson, May 2001
Field Summary | |
---|---|
static int |
CANON
|
static int |
HOST
|
static int |
IP
|
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
HostnameTask()
|
Method Summary | |
---|---|
void |
execute()
Description of the Method |
void |
setFailonerror(boolean b)
Should the build fail if this task fails? Default is no. |
void |
setNic(java.lang.String n)
Set a specific network interface to get info for. |
void |
setProperty(java.lang.String p)
|
void |
setShowall(boolean b)
Show all network interfaces, hostnames and IPs for the local host. |
void |
setShowcanonical(boolean b)
|
void |
setShowip(boolean b)
Should this task get the IP address of the local host instead of the hostname? Default is no, get the hostname, not the IP address. |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HOST
public static final int IP
public static final int CANON
Constructor Detail |
---|
public HostnameTask()
Method Detail |
---|
public void setProperty(java.lang.String p)
p
- The name of the property to hold the hostname or IP address.public void setShowip(boolean b)
b
- The new ip valuepublic void setFailonerror(boolean b)
b
- The new failonerror valuepublic void setNic(java.lang.String n)
n
- The new nic valuepublic void setShowall(boolean b)
b
- if true, show all hostnames and IPspublic void setShowcanonical(boolean b)
public void execute()
execute
in class org.apache.tools.ant.Task
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |