Class Thumbnail
- java.lang.Object
-
- rocks.xmpp.extensions.jingle.thumbs.model.Thumbnail
-
public final class Thumbnail extends Object
The implementation of the<thumbnail/>
element in theurn:xmpp:thumbs:1"
namespace.- See Also:
- XEP-0264: Jingle Content Thumbnails
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getHeight()
The intended display height of the thumbnail image.String
getMediaType()
The value of the 'media-type' attribute MUST match the syntax specified in RFC 2045 [3].URI
getUri()
A URI where the thumbnail data can be accessed (typically by using a URI scheme of 'cid:', 'https:', or 'http:').Integer
getWidth()
The intended display width of the thumbnail image.String
toString()
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
urn:xmpp:thumbs:1- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Thumbnail
public Thumbnail(URI uri)
Creates a thumbnail.- Parameters:
uri
- A URI where the thumbnail data can be accessed (typically by using a URI scheme of 'cid:', 'https:', or 'http:'). If the URI scheme is 'cid:' then the identifier MUST refer to a bit of binary data as described in Bits of Binary (XEP-0231).
-
Thumbnail
public Thumbnail(URI uri, String mediaType, Integer width, Integer height)
Creates a thumbnail.- Parameters:
uri
- A URI where the thumbnail data can be accessed (typically by using a URI scheme of 'cid:', 'https:', or 'http:'). If the URI scheme is 'cid:' then the identifier MUST refer to a bit of binary data as described in Bits of Binary (XEP-0231).mediaType
- The value of the 'media-type' attribute MUST match the syntax specified in RFC 2045 [3]. That is, the value MUST include a top-level media type, the "/" character, and a subtype; in addition, it MAY include one or more optional parameters.width
- The intended display width of the thumbnail image. Used as a hint for the receiving client to prepare the appropriate UI, such as a dialog window.height
- The intended display height of the thumbnail image. Used as a hint for the receiving client to prepare the appropriate UI, such as a dialog window.
-
-
Method Detail
-
getUri
public final URI getUri()
A URI where the thumbnail data can be accessed (typically by using a URI scheme of 'cid:', 'https:', or 'http:'). If the URI scheme is 'cid:' then the identifier MUST refer to a bit of binary data as described in Bits of Binary (XEP-0231).- Returns:
- The URI.
- See Also:
- Bits of Binary (XEP-0231)
-
getMediaType
public final String getMediaType()
The value of the 'media-type' attribute MUST match the syntax specified in RFC 2045 [3]. That is, the value MUST include a top-level media type, the "/" character, and a subtype; in addition, it MAY include one or more optional parameters.- Returns:
- The media type.
-
getWidth
public final Integer getWidth()
The intended display width of the thumbnail image. Used as a hint for the receiving client to prepare the appropriate UI, such as a dialog window.- Returns:
- The width.
-
getHeight
public final Integer getHeight()
The intended display height of the thumbnail image. Used as a hint for the receiving client to prepare the appropriate UI, such as a dialog window.- Returns:
- The height.
-
-