Tuesday, April 26, 2005
Joining a Peer Group with PSE Membership
This posting deals with the comments I have regarding Joining the SAXTA Peer group (using PSEMembership).
To manage to join the saxta group, i reused extensively the code provided in the JXTA plaform, especially the net.jxta.impl.membership.pse.pseMembershipTest class. I want to thank JXTA for providing it.
Comment 1
The first step into joining the SAXTA group is getting a instance of AuthenticationCredential using the following constructor:
AuthenticationCredential(PeerGroup peerGroup, String method, Element indentityInfo)
Let's discuss about the parameters of this constructor:
AuthenticationCredential authCred =new AuthenticationCredential( saxtaGroup, "StringAuthentication", null);
.
To manage to join the saxta group, i reused extensively the code provided in the JXTA plaform, especially the net.jxta.impl.membership.pse.pseMembershipTest class. I want to thank JXTA for providing it.
Comment 1
The first step into joining the SAXTA group is getting a instance of AuthenticationCredential using the following constructor:
AuthenticationCredential(PeerGroup peerGroup, String method, Element indentityInfo)
Let's discuss about the parameters of this constructor:
- The "peerGroup" parameter is self explanatory, it refers to the peer group that we are trying to join.
- The "method" parameter is more confusing, the java doc says: "The authentication method which will be requested when the AuthentiationCredential is provided to the peergroup Membership Service." Valids for the "method" parameters are undocumented and to find out what they are you have to look into the source code of the AuthenticationCredential and PSEMembershipService classes. The String "StringAuthentication" for the method parameters makes the constructor return a non-interactive AuthenticatorCredential instance, which is what I wanted.
- Last The Element "indentitityInfo" parameter is described as "Optional additional information about the identity being requested which is used by the authentication method. This information is passed to the authentication method during the apply operation of the Membership Service". I'm still unsure of what it is, but tt works when you pass the AuthenticatorCredential constructor the value null. Cf comment 2 and 3 previously posted on this Blog (April 25th).
AuthenticationCredential authCred =new AuthenticationCredential( saxtaGroup, "StringAuthentication", null);
.
Comments:
<< Home
Thanks for opening up public comments
I warned you that I would respond!
Re:Comment 1:
Good points. I've update the documentation to clarify how AuthenticationCredential works.
I'm not sure I totally agree with the sentiment about APIs not using null within APIs to reflect unused or defaulted arguements. I see limited use of nulled parameters as a good alternative to a proliferation to methods. Obviously it's possible to go too far one way or the other and maybe some uses of nulled parameters within JXTA is borderline (just like there are probably examples of JXTA APIs with too many parameters)
I warned you that I would respond!
Re:Comment 1:
Good points. I've update the documentation to clarify how AuthenticationCredential works.
I'm not sure I totally agree with the sentiment about APIs not using null within APIs to reflect unused or defaulted arguements. I see limited use of nulled parameters as a good alternative to a proliferation to methods. Obviously it's possible to go too far one way or the other and maybe some uses of nulled parameters within JXTA is borderline (just like there are probably examples of JXTA APIs with too many parameters)
Hi Blogger, I was looking for peer 2 peer related info for my site at http://www.p2p-mp3-filesharing.com and thought I would check out some blog sites. I get sidetracked easily these days....getting old...lol. It was an interesting read. Thanks, mike
Hey Blogger, nice blog site. Seems everybody has one of these blog sites except me. Even my sister has one, but she just likes to complain about everything....and I really mean everything. You know, the world sucks, etc...lol. She started it after her boyfriend dumped her. Originally I started out searching websites looking for file sharing related info to improve the traffic at my site http://www.p2p-mp3-filesharing.com; then I decided to try blog sites. There are so many of them it's unbelievable. I never heard of or knew what a blog was until last year. Anyway, I'm trying to improve my site at http://www.p2p-mp3-filesharing.com and was originally looking for relevant information I could use. Got sidetracked a bit....lol. It was interesting. Thanks Blogger, Mike
Post a Comment
<< Home
