directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald <flying...@gmail.com>
Subject Re: [jira] Created: (DIRMINA-147) Use URI instead of SocketAddress
Date Mon, 19 Dec 2005 09:44:06 GMT
Sorry,I forget my password and try it out just now....-_-!!

2005/12/19, Trustin Lee <trustin@gmail.com>:
> I think it would be great if we can make URI interface as many methods as it
> 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 <flyingbug@gmail.com>:
> > 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 = ip;
> >                 this.port = port;
> >         }
> >
> >         public int getPort()
> >         {
> >                 return port;
> >         }
> >
> >         public String getIp()
> >         {
> >                 return ip;
> >         }
> >
> >         public boolean equals(Object o)
> >         {
> >                 if (o == null)
> >                         return false;
> >                 if (o == this)
> >                         return true;
> >                 if (!(o instanceof SessionURI))
> >                         return false;
> >                 SessionURI another = (SessionURI) o;
> >                 return another.getIp().equals(ip) && another.getPort() ==
> port;
> >         }
> >
> >         public int hashCode()
> >         {
> >                 int result = 17;
> >                 result = 37 * result + ip.hashCode();
> >                 result = 37 * result + port;
> >                 return result;
> >         }
> >
> >         public String toString()
> >         {
> >                 return ip + ":" + port;
> >         }
> > }
> >
> > I think it's too simple,WDYT?
> >
> > 2005/12/19, Trustin Lee <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/


--
Donald
Mime
View raw message