Interface EncryptedPushMessage


  • public interface EncryptedPushMessage

    Implementations of this interface represent an encrypted push message.

    Thread Safety:

    Depends on implementations. Typically, an implementation of this interface is thread-safe. See MessageEncryptions.

    Author:
    Tomoki Sato
    • Method Detail

      • toBytes

        byte[] toBytes()
        Converts this encrypted push message to the octet sequence. This octet sequence is typically put into the body of an HTTP request to a push service.
        Returns:
        the octet sequence that represents this encrypted push message.
      • length

        int length()

        Returns the length of this encrypted push message.

        Typically, the returned value is used to set the "Content-Length" HTTP header field.

        Returns:
        the length of this encrypted push message.
      • contentEncoding

        String contentEncoding()

        Returns the content encoding of this encrypted push message (e.g. "aes128gcm").

        Typically, the returned value is used to set the "Content-Encoding" HTTP header field.

        Returns:
        the content encoding of this encrypted push message.
      • mediaType

        default String mediaType()

        Returns the media type of this encrypted push message (e.g. "application/octet-stream").

        Typically, the returned value is used to set the "Content-Type" HTTP header field.

        Returns:
        the media type of this encrypted push message.