Interface PushApi


  • @Path("/_matrix/push/v1")
    @Consumes("application/json")
    @Produces("application/json")
    public interface PushApi
    This describes the format used by "HTTP" pushers to send notifications of events to Push Gateways. If the endpoint returns an HTTP error code, the homeserver SHOULD retry for a reasonable amount of time using exponential backoff.
    • Method Summary

      Modifier and Type Method Description
      void pushNotify​(Notification notification, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      This endpoint is invoked by HTTP pushers to notify a push gateway about an event or update the number of unread notifications a user has.
    • Method Detail

      • pushNotify

        @POST
        @Path("/notify")
        void pushNotify​(Notification notification,
                        @Context
                        javax.ws.rs.core.UriInfo uriInfo,
                        @Context
                        javax.ws.rs.core.HttpHeaders httpHeaders,
                        @Suspended
                        javax.ws.rs.container.AsyncResponse asyncResponse)
        This endpoint is invoked by HTTP pushers to notify a push gateway about an event or update the number of unread notifications a user has. In the former case it will contain selected information about the event. In either case it may contain numeric counts of the number of unread events of different types the user has. The counts may be sent along with a notification about an event or by themselves.
        Notifications about a particular event will normally cause the user to be alerted in some way. It is therefore necessary to perform duplicate suppression for such notifications using the event_id field to avoid retries of this HTTP API causing duplicate alerts. The operation of updating counts of unread notifications should be idempotent and therefore do not require duplicate suppression.
        Notifications are sent to the URL configured when the pusher is created. This means that the HTTP path may be different depending on the push gateway.
        Return: RejectedPushKey.

        Status code 200: A list of rejected push keys.

        Parameters:
        notification - Information about the push notification.
        uriInfo - Information about the request.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.