Accept client suggested resource names

Details

Description

Modify Vysper so it will accept a client's suggested resource name at during resource binding. This includes performing a ResourcePrep on the suggested name and checking it for size (0-1023 characters). It should also limit the maximum number of resources that can be bound to a single bare JID.

Mike Mahoney
added a comment - 05/Oct/11 05:23 I've made some additional changes to BindIQHandler.java. It now handles the three conflict policies outlines in http://xmpp.org/rfcs/rfc6120.html#bind-clientsubmit-error-conflict . The third scenario is more complicated than the first two, so any feedback on the implementation is welcomed.
The second patch is a complete patch for VYSPER-297 . The first patch file can be ignored.

I wanted to point out one change in the patch that isn't obvious. I modified org.apache.vysper.xmpp.modules.core.TestUser.createForSession(). Previously it was returning a new TestUser with a stored resource, but the entity that it stored did not have a bound resource. This would cause problems in testing when using the new ResourceRegistry API, since the new API requires Entities with bound resources instead of resource name Strings as parameters.

The change required updates to some other tests as well, but everything seems to be working now.

Mike Mahoney
added a comment - 03/Oct/11 20:15 I wanted to point out one change in the patch that isn't obvious. I modified org.apache.vysper.xmpp.modules.core.TestUser.createForSession(). Previously it was returning a new TestUser with a stored resource, but the entity that it stored did not have a bound resource. This would cause problems in testing when using the new ResourceRegistry API, since the new API requires Entities with bound resources instead of resource name Strings as parameters.
The change required updates to some other tests as well, but everything seems to be working now.