org.apache.tools.ant.taskdefs.condition

Class Socket

public class Socket extends ProjectComponent implements Condition

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

Method Summary
booleaneval()
voidsetPort(int port)
Set the port attribute
voidsetServer(String server)
Set the server attribute

Method Detail

eval

public boolean eval()

Returns: true if a socket can be created

Throws: BuildException if the attributes are not set

setPort

public void setPort(int port)
Set the port attribute

Parameters: port the port number of the socket

setServer

public void setServer(String server)
Set the server attribute

Parameters: server the server name

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.