Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.condition

public Class Socket

extends ProjectComponent
implements Condition
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.condition.Condition
Imports
java.io.IOException, org.apache.tools.ant.BuildException, .Project, .ProjectComponent

Condition to wait for a TCP/IP socket to have a listener. Its attributes are: server - the name of the server. port - the port number of the socket.
Since
Ant 1.5

Field Summary

Modifier and TypeField and Description
private int
private String
Inherited from org.apache.tools.ant.ProjectComponent:
descriptionlocationproject

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if a socket can be created
eval
()

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Is this condition true?
public void
setPort(int
the port number of the socket
port
)

Set the port attribute

public void
setServer(String
the server name
server
)

Set the server attribute

Inherited from org.apache.tools.ant.ProjectComponent:
clonegetDescriptiongetLocationgetProjectloglogsetDescriptionsetLocationsetProject

Field Detail

portback to summary
private int port
serverback to summary
private String server

Constructor Detail

Socketback to summary
public Socket()

Method Detail

evalback to summary
public boolean eval() throws BuildException

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Doc from org.apache.tools.ant.taskdefs.condition.Condition.eval.

Is this condition true?

Returns:boolean

true if a socket can be created

Annotations
@Override
Exceptions
BuildException:
if the attributes are not set
setPortback to summary
public void setPort(int port)

Set the port attribute

Parameters
port:int

the port number of the socket

setServerback to summary
public void setServer(String server)

Set the server attribute

Parameters
server:String

the server name