1 10 11 package org.mule.providers.xmpp; 12 13 import org.mule.config.i18n.Message; 14 import org.mule.impl.endpoint.UserInfoEndpointBuilder; 15 import org.mule.umo.endpoint.MalformedEndpointException; 16 17 import java.net.URI ; 18 import java.util.Properties ; 19 20 28 public class XmppEndpointBuilder extends UserInfoEndpointBuilder 29 { 30 protected void setEndpoint(URI uri, Properties props) throws MalformedEndpointException 31 { 32 if (uri.getPath().length() == 0) 33 { 34 throw new MalformedEndpointException(new Message("xmpp", 1), uri.toString()); 35 } 36 if (props.getProperty(XmppConnector.XMPP_GROUP_CHAT, "false").equalsIgnoreCase("true")) 37 { 38 if (props.getProperty(XmppConnector.XMPP_NICKNAME, null) == null) 39 { 40 throw new MalformedEndpointException(new Message("xmpp", 2), uri.toString()); 41 } 42 } 43 super.setEndpoint(uri, props); 44 } 45 } 46 | Popular Tags |