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 Summary
Modifier and TypeMethodDescriptionvoidThe client cancels a file or a reservation.voidonReserve(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 refusesUploadChannelProps.REASON_DENIEDotherwise, and answers withUploadChannelProps.sendReserved(int,IUploadReservation)orUploadChannelProps.sendRefused(int,String).voidThe client's own pause or resume notice (rows 11 and 13).
Method Details
onReserve
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 refusesUploadChannelProps.REASON_DENIEDotherwise, and answers withUploadChannelProps.sendReserved(int,IUploadReservation)orUploadChannelProps.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
onState
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.