// value of the subscription, added by the routing logic as request parameter
String value = request.getParameter("value");
@SuppressWarnings("rawtypes") Map formData = parseXmppFormData(request);
return new SubscriptionBuilder()
.withFromJid(new JID((String) formData.get("from")))
.withToJid(new JID((String) formData.get("to")))
.withSubscriptionType(SubscriptionType.valueOf(value.toUpperCase()))
.build();
}