JidCreate.from
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.jxmpp.jid.impl.JidCreate.from(Showing top 15 results out of 315)

origin: org.igniterealtime.smack/smack-core

/**
 * Creates a new message to the specified recipient and with the specified body.
 *
 * @param to the user to send the message to.
 * @param body the body of the message.
 * @throws XmppStringprepException if 'to' is not a valid XMPP address.
 */
public Message(String to, String body) throws XmppStringprepException {
  this(JidCreate.from(to), body);
}
origin: spring-projects/spring-ws

protected XmppSenderConnection(XMPPConnection connection, String to, String thread) {
  Assert.notNull(connection, "'connection' must not be null");
  Assert.hasLength(to, "'to' must not be empty");
  Assert.hasLength(thread, "'thread' must not be empty");
  this.connection = connection;
  try {
    this.requestMessage = new Message(JidCreate.from(to), Message.Type.chat);
  } catch (XmppStringprepException e) {
    throw new RuntimeException(e);
  }
  this.requestMessage.setThread(thread);
}
origin: org.igniterealtime.smack/smack-core

/**
 * Sets who the stanza(/packet) is being sent "to". The XMPP protocol often makes
 * the "to" attribute optional, so it does not always need to be set.
 *
 * @param to who the stanza(/packet) is being sent to.
 * @throws IllegalArgumentException if to is not a valid JID String.
 * @deprecated use {@link #setTo(Jid)} instead.
 */
@Deprecated
public void setTo(String to) {
  Jid jid;
  try {
    jid = JidCreate.from(to);
  }
  catch (XmppStringprepException e) {
    throw new IllegalArgumentException(e);
  }
  setTo(jid);
}
origin: jitsi/jicofo

/**
 * Method will be called by OSGi after {@link #init()} is called.
 */
@Override
public void start(BundleContext bc)
  throws Exception
{
  ConfigurationService configService
    = ServiceUtils.getService(bc, ConfigurationService.class);
  loadConfig(configService, "org.jitsi.jicofo");
  if (!isPingTaskStarted())
    startPingTask();
  String shutdownAllowedJid
      = configService.getString(SHUTDOWN_ALLOWED_JID_PNAME);
  this.shutdownAllowedJid
    = StringUtils.isNullOrEmpty(shutdownAllowedJid)
      ? null
      : JidCreate.from(shutdownAllowedJid);
  authAuthority
    = ServiceUtils.getService(bc, AuthenticationAuthority.class);
  focusManager = ServiceUtils.getService(bc, FocusManager.class);
  reservationSystem
    = ServiceUtils.getService(bc, ReservationSystem.class);
}
origin: jitsi/jicofo

/**
 * Gets Jibri JID associated with this <tt>JibriEvent</tt> instance.
 *
 * @return <tt>String</tt> which is a JID of the Jibri for which this event
 *         instance has been created.
 */
public Jid getJibriJid()
{
  try
  {
    return JidCreate.from(getProperty(JIBRI_JID_KEY).toString());
  }
  catch (XmppStringprepException e)
  {
    logger.error("Invalid Jibri JID", e);
    return null;
  }
}
origin: org.igniterealtime.smack/smack-core

public static EntityJid getEntityJidAttribute(XmlPullParser parser, String name) throws XmppStringprepException {
  final String jidString = parser.getAttributeValue("", name);
  if (jidString == null) {
    return null;
  }
  Jid jid = JidCreate.from(jidString);
  if (!jid.hasLocalpart()) return null;
  EntityFullJid fullJid = jid.asEntityFullJidIfPossible();
  if (fullJid != null) {
    return fullJid;
  }
  EntityBareJid bareJid = jid.asEntityBareJidIfPossible();
  return bareJid;
}
origin: org.apache.camel/camel-xmpp

message.setTo(JidCreate.from(room));
message.setFrom(JidCreate.from(endpoint.getUser()));
origin: org.igniterealtime.smack/smack-extensions

@Override
public UnblockContactsIQ parse(XmlPullParser parser, int initialDepth) throws Exception {
  List<Jid> jids = null;
  outerloop: while (true) {
    int eventType = parser.next();
    switch (eventType) {
    case XmlPullParser.START_TAG:
      if (parser.getName().equals("item")) {
        if (jids == null) {
          jids = new ArrayList<>();
        }
        jids.add(JidCreate.from(parser.getAttributeValue("", "jid")));
      }
      break;
    case XmlPullParser.END_TAG:
      if (parser.getDepth() == initialDepth) {
        break outerloop;
      }
      break;
    }
  }
  return new UnblockContactsIQ(jids);
}
origin: jitsi/jicofo

@Override
public void grantAdmin(String address)
{
  try
  {
    muc.grantAdmin(JidCreate.from(address));
  }
  catch (Exception e)
  {
    throw new RuntimeException(e);
  }
}
origin: jitsi/jicofo

/**
 * Returns pre-configured JVB address of the bridge that must be used in a
 * conference instead of any other bridges that would come from
 * <tt>BridgeSelector</tt>. <tt>null</tt> if not specified.
 * That property is per conference specific.
 */
public Jid getEnforcedVideobridge()
{
  try
  {
    String enforcedBridge = properties.get(ENFORCED_BRIDGE);
    if (StringUtils.isNullOrEmpty(enforcedBridge))
    {
      return null;
    }
    return JidCreate.from(enforcedBridge);
  }
  catch (XmppStringprepException e)
  {
    logger.error("Invalid JID for enforced videobridge", e);
    return null;
  }
}
origin: org.igniterealtime.smack/smack-core

/**
 * Sets who the stanza(/packet) is being sent "from". The XMPP protocol often
 * makes the "from" attribute optional, so it does not always need to
 * be set.
 *
 * @param from who the stanza(/packet) is being sent to.
 * @throws IllegalArgumentException if from is not a valid JID String.
 * @deprecated use {@link #setFrom(Jid)} instead.
 */
@Deprecated
public void setFrom(String from) {
  Jid jid;
  try {
    jid = JidCreate.from(from);
  }
  catch (XmppStringprepException e) {
    throw new IllegalArgumentException(e);
  }
  setFrom(jid);
}
origin: org.igniterealtime.smack/smack-core

public static Jid getJidAttribute(XmlPullParser parser, String name) throws XmppStringprepException {
  final String jidString = parser.getAttributeValue("", name);
  if (jidString == null) {
    return null;
  }
  return JidCreate.from(jidString);
}
origin: jitsi/jicofo

@Override
public void grantMembership(String address)
{
  try
  {
    muc.grantMembership(JidCreate.from(address));
  }
  catch (Exception e)
  {
    throw new RuntimeException(e);
  }
}
origin: org.igniterealtime.smack/smack-core

/**
 * Creates a new message to the specified recipient and with the specified body.
 *
 * @param to the user to send the message to.
 * @param body the body of the message.
 * @throws XmppStringprepException if 'to' is not a valid XMPP address.
 */
public Message(String to, String body) throws XmppStringprepException {
  this(JidCreate.from(to), body);
}
origin: org.igniterealtime.smack/smack-extensions

@Override
public UnblockContactsIQ parse(XmlPullParser parser, int initialDepth) throws Exception {
  List<Jid> jids = null;
  outerloop: while (true) {
    int eventType = parser.next();
    switch (eventType) {
    case XmlPullParser.START_TAG:
      if (parser.getName().equals("item")) {
        if (jids == null) {
          jids = new ArrayList<>();
        }
        jids.add(JidCreate.from(parser.getAttributeValue("", "jid")));
      }
      break;
    case XmlPullParser.END_TAG:
      if (parser.getDepth() == initialDepth) {
        break outerloop;
      }
      break;
    }
  }
  return new UnblockContactsIQ(jids);
}
org.jxmpp.jid.implJidCreatefrom

Popular methods of JidCreate

  • domainBareFrom
  • entityBareFrom
  • fullFrom
  • bareFrom
  • entityFullFrom

Popular classes and methods

  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)