You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2002/06/30 07:32:15 UTC

cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka/http Proxy.java

dion        2002/06/29 22:32:14

  Modified:    latka/src/java/org/apache/commons/latka/http Proxy.java
  Log:
  Turned -1 from a magic number to a constant, did some reformatting
  
  Revision  Changes    Path
  1.2       +25 -11    jakarta-commons/latka/src/java/org/apache/commons/latka/http/Proxy.java
  
  Index: Proxy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/Proxy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Proxy.java	28 Apr 2002 15:00:57 -0000	1.1
  +++ Proxy.java	30 Jun 2002 05:32:14 -0000	1.2
  @@ -75,13 +75,19 @@
       private String host;
       /** the port to send proxied requests on */
       private int port;
  +    /** the port number that represents port is unassigned */
  +    public static final int PORT_UNSPECIFIED = -1;
       
  -    /** Creates a new instance of Proxy */
  +    /**
  +     * Creates a new instance of Proxy
  +     */
       public Proxy() {
  -        this(null, -1);
  +        this(null, Proxy.PORT_UNSPECIFIED);
       }
       
  -    /** Create a proxy given a host name and port number .
  +    /** 
  +     * Create a proxy given a host name and port number .
  +     *
        * @param host the host name of the proxy to be used.
        * @param port the port to send proxied requests on.
        */
  @@ -90,28 +96,36 @@
           setPort(port);
       }
       
  -    /** Getter for property host.
  +    /**
  +     * Getter for property host.
  +     *
        * @return the host name of the proxy to be used.
        */
  -    public java.lang.String getHost() {
  +    public String getHost() {
           return host;
       }
       
  -    /** Setter for property host.
  +    /**
  +     * Setter for property host.
  +     *
        * @param host the host name of the proxy to be used.
        */
  -    public void setHost(java.lang.String host) {
  +    public void setHost(String host) {
           this.host = host;
       }
       
  -    /** Getter for property port.
  -     * @return he port to send proxied requests on.
  +    /**
  +     * Getter for property port.
  +     *
  +     * @return the port to send proxied requests on.
        */
       public int getPort() {
           return port;
       }
       
  -    /** Setter for property port.
  +    /**
  +     * Setter for property port.
  +     *
        * @param port the port to send proxied requests on.
        */
       public void setPort(int port) {
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>