Class Domainpart

java.lang.Object
org.jxmpp.jid.parts.Part
org.jxmpp.jid.parts.Domainpart
All Implemented Interfaces:
Serializable, CharSequence

public class Domainpart extends Part
A domainpart of an XMPP address (JID).

You can create instances of this class from Strings using from(String).

See Also:
  • Method Details

    • fromOrNull

      public static Domainpart fromOrNull(CharSequence cs)
      Get a Domainpart from a given CharSequence or null if the input is not a valid domainpart.
      Parameters:
      cs - the input CharSequence
      Returns:
      a Domainpart or null
    • fromOrThrowUnchecked

      public static Domainpart fromOrThrowUnchecked(CharSequence cs)
      Like from(String) but does throw an unchecked IllegalArgumentException instead of a XmppStringprepException.
      Parameters:
      cs - the character sequence which should be transformed to a Domainpart
      Returns:
      the Domainpart if no exception occurs
      Throws:
      IllegalArgumentException - if the given input is not a valid Domainpart
      Since:
      0.6.2
      See Also:
    • from

      public static Domainpart from(String domain) throws org.jxmpp.stringprep.XmppStringprepException
      Get the Domainpart representing the input String.
      Parameters:
      domain - the input String.
      Returns:
      the domainpart.
      Throws:
      org.jxmpp.stringprep.XmppStringprepException - if an error occurs.
    • from

      public static Domainpart from(String domain, org.jxmpp.JxmppContext context) throws org.jxmpp.stringprep.XmppStringprepException
      Get the Domainpart representing the input String.
      Parameters:
      domain - the input String.
      context - the JXMPP context.
      Returns:
      the domainpart.
      Throws:
      org.jxmpp.stringprep.XmppStringprepException - if an error occurs.