Interface UploadChannelProps.IHandler

All Known Implementing Classes:
ClientSessionUploadChannel
Enclosing class:
UploadChannelProps

public static interface UploadChannelProps.IHandler
The server side of the channel: what the client's calls are handed to. Installed by the server when the client session is created; every method is called on the client session's worker, at once, with the parameters already decoded.
Author:
Christopher Mindus
  • Method Details

    • onReserve

      void onReserve(UploadChannelProps channel, UploadRequest request)
      The client asks for a reservation directly on the channel, with no component in between: the handler reserves with the session's upload service when the App opened the direct route and refuses UploadChannelProps.REASON_DENIED otherwise, and answers with UploadChannelProps.sendReserved(int,IUploadReservation) or UploadChannelProps.sendRefused(int,String).
      Parameters:
      channel - The channel the request came in on.
      request - The request, decoded and not yet answered; its source is null.
    • onCancel

      void onCancel(String reservationID, int fileIndex, String reason)
      The client cancels a file or a reservation.
      Parameters:
      reservationID - The reservation ID.
      fileIndex - The file index, or -1 for the whole reservation.
      reason - The reason, never null.
    • onState

      void onState(String reservationID, int fileIndex, boolean paused, String reason)
      The client's own pause or resume notice (rows 11 and 13).
      Parameters:
      reservationID - The reservation ID.
      fileIndex - The file index, or -1 for every file.
      paused - true for a pause, false for a resume.
      reason - The reason of a pause, empty for a resume.