| /* |
| * Copyright (C) The Apache Software Foundation. All rights reserved. |
| * |
| * This software is published under the terms of the Apache Software License |
| * version 1.1, a copy of which has been included with this distribution in |
| * the LICENSE.txt file. |
| */ |
| package org.apache.tools.ant.taskdefs.optional.sitraka; |
| |
| /** |
| * Socket element for connection. <tt><socket/></tt> defaults to host |
| * 127.0.0.1 and port 4444 Otherwise it requires the host and port attributes to |
| * be set: <tt> <socket host="e;175.30.12.1"e; |
| * port="e;4567"e;/> </tt> |
| * |
| * @author RT |
| */ |
| public class Socket |
| { |
| |
| /** |
| * default to localhost |
| */ |
| private String host = "127.0.0.1"; |
| |
| /** |
| * default to 4444 |
| */ |
| private int port = 4444; |
| |
| public void setHost( String value ) |
| { |
| host = value; |
| } |
| |
| public void setPort( Integer value ) |
| { |
| port = value.intValue(); |
| } |
| |
| /** |
| * if no host is set, returning ':<port>', will take localhost |
| * |
| * @return Description of the Returned Value |
| */ |
| public String toString() |
| { |
| return host + ":" + port; |
| } |
| } |