Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 16497 invoked from network); 19 Dec 2005 09:12:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Dec 2005 09:12:47 -0000 Received: (qmail 76028 invoked by uid 500); 19 Dec 2005 09:12:46 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 75990 invoked by uid 500); 19 Dec 2005 09:12:45 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 75979 invoked by uid 99); 19 Dec 2005 09:12:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Dec 2005 01:12:45 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of trustin@gmail.com designates 64.233.184.197 as permitted sender) Received: from [64.233.184.197] (HELO wproxy.gmail.com) (64.233.184.197) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Dec 2005 01:12:44 -0800 Received: by wproxy.gmail.com with SMTP id 57so982523wri for ; Mon, 19 Dec 2005 01:12:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=HRYVYMbOC8DIM5W/PfrA7WlcCtTlF85wvdTuNI17paV1e35oirkqrxiiYi979dpoxtVX2ccyCwoGew+gtG0S0nLgAl1g/UonW7kg4WBjevPjwPqYb5zxVG6djHNrt4mgoyI7kCrHKIIq5UOiEktYKEW2cCsr/JUK+QeIDnyngs4= Received: by 10.54.110.1 with SMTP id i1mr667412wrc; Mon, 19 Dec 2005 01:12:23 -0800 (PST) Received: by 10.54.127.19 with HTTP; Mon, 19 Dec 2005 01:12:23 -0800 (PST) Message-ID: <768dcb2e0512190112l73645063t@mail.gmail.com> Date: Mon, 19 Dec 2005 18:12:23 +0900 From: Trustin Lee To: Apache Directory Developers List Subject: Re: [jira] Created: (DIRMINA-147) Use URI instead of SocketAddress In-Reply-To: <74a3b9360512190055u53c82d66o@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22598_5506021.1134983543113" References: <672537426.1134976223516.JavaMail.jira@ajax.apache.org> <74a3b9360512190021r151bf313v@mail.gmail.com> <768dcb2e0512190035i694cda52j@mail.gmail.com> <74a3b9360512190055u53c82d66o@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_22598_5506021.1134983543113 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I think it would be great if we can make URI interface as many methods as i= t can so ppl can use it easily. Empty interface is useless IMHO. And why don't you post your comment in JIRA so we can track the whole conversation? Trustin 2005/12/19, Donald : > > My URI inferface is a empty inteface,just for extend for future,it like > this: > > public interface URI { > } > > and the implement for ipv4 > > public class SessionURI implements URI { > > private String ip; > > private int port; > > public SessionURI(String ip, int port) > { > this.ip =3D ip; > this.port =3D port; > } > > public int getPort() > { > return port; > } > > public String getIp() > { > return ip; > } > > public boolean equals(Object o) > { > if (o =3D=3D null) > return false; > if (o =3D=3D this) > return true; > if (!(o instanceof SessionURI)) > return false; > SessionURI another =3D (SessionURI) o; > return another.getIp().equals(ip) && another.getPort() = =3D=3D > port; > } > > public int hashCode() > { > int result =3D 17; > result =3D 37 * result + ip.hashCode(); > result =3D 37 * result + port; > return result; > } > > public String toString() > { > return ip + ":" + port; > } > } > > I think it's too simple,WDYT? > > 2005/12/19, Trustin Lee : > > Hi Donald, > > > > You could suggest us an interface for URI class. Please reply as a JIR= A > > comment. > > > > Cheers, > > Trustin > > -- > > what we call human nature is actually human habit > > -- > > http://gleamynode.net/ > > > -- > Donald > -- what we call human nature is actually human habit -- http://gleamynode.net/ ------=_Part_22598_5506021.1134983543113 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I think it would be great if we can make URI interface as many methods as i= t can so ppl can use it easily.  Empty interface is useless IMHO.
<= br>And why don't you post your comment in JIRA so we can track the whole co= nversation?

Trustin

2005/12/19, Donald = <flyingbug@gmail.com>:
My URI inferface is a empty inteface,just for extend for future,it like thi= s:

public interface URI {
}

and the implement for ipv4
=
public class SessionURI implements URI {

    = ;    private String  ip;

        private int &n= bsp;           port;
<= br>        public SessionURI(String= ip, int port)
        {
&nbs= p;            &= nbsp;  this.ip =3D ip;
      &nb= sp;         this.port =3D port= ;
        }

  &= nbsp;     public int getPort()
        {
   =             &nb= sp;return port;
        }
        public String getIp()
&= nbsp;       {
    = ;            re= turn ip;
        }

 =        public boolean equals(Object o)        {
   &n= bsp;            = ;if (o =3D=3D null)
            = ;            re= turn false;
          =       if (o =3D=3D this)
   = ;            &n= bsp;        return true;
 &= nbsp;           &nbs= p;  if (!(o instanceof SessionURI))
    &n= bsp;            = ;       return false;
  &nb= sp;            =  SessionURI another =3D (SessionURI) o;
            = ;    return another.getIp().equals(ip) && anoth= er.getPort() =3D=3D port;
       &nbs= p;}

        public int hashC= ode()
        {
  &= nbsp;           &nbs= p; int result =3D 17;
       &nb= sp;        result =3D 37 * result += =20 ip.hashCode();
         &nb= sp;      result =3D 37 * result + port;
&n= bsp;            = ;   return result;
      &n= bsp; }

        public S= tring toString()
        {
&n= bsp;            = ;   return ip + ":" + port;
   &= nbsp;    }
}

I think it's too simple,WDYT?

2005/12/19, Trustin Lee &= lt;trustin@gmail.com>:
> = Hi Donald,
>
> You could suggest us an interface for URI class.=   Please reply as a JIRA
> comment.
>
> Cheers,
> Trustin
> --
>= ; what we call human nature is actually human habit
> --
> http://gleamynode.net/


--
Donald



--
what we call = human nature is actually human habit
--
http://gleamynode.net/ ------=_Part_22598_5506021.1134983543113--