Class Body.Builder

  • Enclosing class:
    Body

    public static final class Body.Builder
    extends Object
    A builder for the body element.
    • Method Detail

      • uri

        public final Body.Builder uri​(URI uri)
        Sets the 'uri' attribute of the body.
        Parameters:
        uri - The 'uri' attribute.
        Returns:
        The builder.
      • accept

        public final Body.Builder accept​(String accept)
        Sets the 'accept' attribute of the body.
        Parameters:
        accept - The 'accept' attribute.
        Returns:
        The builder.
      • ack

        public final Body.Builder ack​(long ack)
        Sets the 'ack' attribute of the body.
        Parameters:
        ack - The 'ack' attribute.
        Returns:
        The builder.
      • authId

        public final Body.Builder authId​(String authId)
        Sets the 'authid' attribute of the body.
        Parameters:
        authId - The 'authid' attribute.
        Returns:
        The builder.
      • charsets

        public final Body.Builder charsets​(Charset... charsets)
        Sets the 'charsets' attribute of the body.
        Parameters:
        charsets - The 'charsets' attribute.
        Returns:
        The builder.
      • condition

        public final Body.Builder condition​(Body.Condition condition)
        Sets the 'condition' attribute of the body.
        Parameters:
        condition - The 'condition' attribute.
        Returns:
        The builder.
      • content

        public final Body.Builder content​(String content)
        Sets the 'content' attribute of the body.
        Parameters:
        content - The 'content' attribute.
        Returns:
        The builder.
      • from

        public final Body.Builder from​(Jid from)
        Sets the 'from' attribute of the body.
        Parameters:
        from - The 'from' attribute.
        Returns:
        The builder.
      • hold

        public final Body.Builder hold​(short hold)
        Sets the 'hold' attribute of the body.
        Parameters:
        hold - The 'hold' attribute.
        Returns:
        The builder.
      • inactivity

        public final Body.Builder inactivity​(Duration inactivity)
        Sets the 'inactivity' attribute of the body.
        Parameters:
        inactivity - The 'inactivity' attribute.
        Returns:
        The builder.
      • key

        public final Body.Builder key​(String key)
        Sets the 'key' attribute of the body.
        Parameters:
        key - The 'key' attribute.
        Returns:
        The builder.
      • maxPause

        public final Body.Builder maxPause​(Duration maxPause)
        Sets the 'maxpause' attribute of the body.
        Parameters:
        maxPause - The 'maxpause' attribute.
        Returns:
        The builder.
      • newKey

        public final Body.Builder newKey​(String newKey)
        Sets the 'newkey' attribute of the body.
        Parameters:
        newKey - The 'newkey' attribute.
        Returns:
        The builder.
      • pause

        public final Body.Builder pause​(Duration pause)
        Sets the 'pause' attribute of the body.
        Parameters:
        pause - The 'pause' attribute.
        Returns:
        The builder.
      • polling

        public final Body.Builder polling​(Duration polling)
        Sets the 'polling' attribute of the body.
        Parameters:
        polling - The 'polling' attribute.
        Returns:
        The builder.
      • report

        public final Body.Builder report​(long report)
        Sets the 'report' attribute of the body.
        Parameters:
        report - The 'report' attribute.
        Returns:
        The builder.
      • requests

        public final Body.Builder requests​(short requests)
        Sets the 'requests' attribute of the body.
        Parameters:
        requests - The 'requests' attribute.
        Returns:
        The builder.
      • requestId

        public final Body.Builder requestId​(long requestId)
        Sets the 'rid' attribute of the body.
        Parameters:
        requestId - The 'rid' attribute.
        Returns:
        The builder.
      • route

        public final Body.Builder route​(String route)
        Sets the 'route' attribute of the body.
        Parameters:
        route - The 'route' attribute.
        Returns:
        The builder.
      • sessionId

        public final Body.Builder sessionId​(String sessionId)
        Sets the 'sid' attribute of the body.
        Parameters:
        sessionId - The 'sid' attribute.
        Returns:
        The builder.
      • stream

        public final Body.Builder stream​(String stream)
        Sets the 'stream' attribute of the body.
        Parameters:
        stream - The 'stream' attribute.
        Returns:
        The builder.
      • time

        public final Body.Builder time​(Duration time)
        Sets the 'time' attribute of the body.
        Parameters:
        time - The 'time' attribute.
        Returns:
        The builder.
      • to

        public final Body.Builder to​(Jid to)
        Sets the 'to' attribute of the body.
        Parameters:
        to - The 'to' attribute.
        Returns:
        The builder.
      • type

        public final Body.Builder type​(Body.Type type)
        Sets the 'type' attribute of the body.
        Parameters:
        type - The 'type' attribute.
        Returns:
        The builder.
      • version

        public final Body.Builder version​(String version)
        Sets the 'ver' attribute of the body.
        Parameters:
        version - The 'ver' attribute.
        Returns:
        The builder.
      • wait

        public final Body.Builder wait​(Duration wait)
        Sets the 'wait' attribute of the body.
        Parameters:
        wait - The 'wait' attribute.
        Returns:
        The builder.
      • language

        public final Body.Builder language​(Locale language)
        Sets the 'lang' attribute of the body.
        Parameters:
        language - The 'lang' attribute.
        Returns:
        The builder.
      • xmppVersion

        public final Body.Builder xmppVersion​(String xmppVersion)
        Sets the 'version' attribute of the body.
        Parameters:
        xmppVersion - The 'version' attribute.
        Returns:
        The builder.
      • restart

        public final Body.Builder restart​(boolean restart)
        Sets the 'restart' attribute of the body.
        Parameters:
        restart - The 'restart' attribute.
        Returns:
        The builder.
      • restartLogic

        public final Body.Builder restartLogic​(boolean restartlogic)
        Sets the 'restartlogic' attribute of the body.
        Parameters:
        restartlogic - The 'restartlogic' attribute.
        Returns:
        The builder.
      • wrappedObjects

        public final Body.Builder wrappedObjects​(Collection<Object> objects)
        Sets the wrapped objects of the body, i.e. the payload.
        Parameters:
        objects - The wrapped objects.
        Returns:
        The builder.
      • build

        public final Body build()
        Builds the body.
        Returns:
        The body.